From 553cc94bc895673fc5a6b16f40c58995c82435d3 Mon Sep 17 00:00:00 2001 From: eight Date: Fri, 15 Sep 2017 01:30:26 +0800 Subject: [PATCH] Fix: style install button --- content/install-user-css.css | 16 ++++++++++++++++ content/install-user-css.js | 1 + 2 files changed, 17 insertions(+) diff --git a/content/install-user-css.css b/content/install-user-css.css index a6ecf9d5..2646e348 100644 --- a/content/install-user-css.css +++ b/content/install-user-css.css @@ -75,6 +75,22 @@ button.install { padding: 0.4em 0.8em; } +button.install { + background: #3586FF; + color: white; + border-radius: 0.2em; + border: 1px solid #0026ff; +} + +button.install:not([disabled]):active { + box-shadow: inset 0px 0px 0.4em 0px #6A3B82; +} + +button.install.installed { + background: #00F587; + border-color: #00ae08; +} + .code { padding: 2em; font-family: monospace; diff --git a/content/install-user-css.js b/content/install-user-css.js index fddd7ec3..b084784a 100644 --- a/content/install-user-css.js +++ b/content/install-user-css.js @@ -16,6 +16,7 @@ function install(style) { .forEach(el => el.remove()); $('button.install').textContent = 'Installed'; $('button.install').disabled = true; + $('button.install').classList.add('installed'); window.dispatchEvent(new CustomEvent('installed', {detail: result})); }) .catch(err => {