feat(cc-dark-theme): use sass instead of static css
In order to despaghettify the dark theme styles, this CL introduces Sass
compilation for the dark theme styles.
Bug: twpowertools:21
Change-Id: Ibbae3f85f355fab690f42f2bae9cf7766d9d43a3
diff --git a/src/static/css/ccdarktheme.css b/src/ccDarkTheme/main.scss
similarity index 99%
rename from src/static/css/ccdarktheme.css
rename to src/ccDarkTheme/main.scss
index 9ef0e7a..69b2eb6 100644
--- a/src/static/css/ccdarktheme.css
+++ b/src/ccDarkTheme/main.scss
@@ -1168,7 +1168,6 @@
color: var(--TWPT-interop-secondary-text);
}
-.scSharedMaterialfabroot:.scSharedMaterialfabfake-focus,
.scSharedMaterialfabroot:hover,
.scSharedMaterialfabroot:focus {
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.302), 0 6px 10px 4px rgba(0, 0, 0, 0.149);
diff --git a/src/contentScripts/communityConsole/start.js b/src/contentScripts/communityConsole/start.js
index 2bac9a3..a597aaa 100644
--- a/src/contentScripts/communityConsole/start.js
+++ b/src/contentScripts/communityConsole/start.js
@@ -68,11 +68,11 @@
switch (options.ccdarktheme_mode) {
case 'switch':
if (options.ccdarktheme_switch_status == true)
- injectStylesheet(chrome.runtime.getURL('css/ccdarktheme.css'));
+ injectStylesheet(chrome.runtime.getURL('ccDarkTheme.bundle.css'));
break;
case 'system':
- injectStylesheet(chrome.runtime.getURL('css/ccdarktheme.css'), {
+ injectStylesheet(chrome.runtime.getURL('ccDarkTheme.bundle.css'), {
'media': '(prefers-color-scheme: dark)',
});
break;