Просмотр исходного кода

reorganize scss for preset-themes

Yuki Takei 2 лет назад
Родитель
Сommit
6f1898abe7

+ 2 - 0
packages/preset-themes/src/styles/bootstrap/_init.scss

@@ -1,6 +1,8 @@
 @import 'bootstrap/scss/functions';
 
 @import './variables';
+@import 'bootstrap/scss/variables';
+@import 'bootstrap/scss/variables-dark';
 
 @import 'bootstrap/scss/maps';
 // merge $colors to $theme-colors

+ 0 - 4
packages/preset-themes/src/styles/bootstrap/_variables.scss

@@ -1,5 +1,4 @@
 @use '../variables';
-@use 'bootstrap/scss/functions' as *;
 
 //
 // Variables
@@ -167,6 +166,3 @@ $pre-color: dummyinvalildcolor; // disable pre color specification with invalid
 // $custom-checkbox-indicator-border-radius: 0px;
 // $custom-control-indicator-focus-box-shadow: none;
 // $custom-control-indicator-size: 1.2rem;
-
-@import 'bootstrap/scss/variables';
-@import 'bootstrap/scss/variables-dark';

+ 5 - 5
packages/preset-themes/src/styles/default.scss

@@ -1,5 +1,5 @@
-@use './variables' as *;
-@use './bootstrap/variables' as *;
+@use './variables' as var;
+@use './bootstrap/init' as *;
 @use './theme/mixins/page-editor-mode-manager';
 @use './theme/hsl-functions' as hsl;
 
@@ -21,7 +21,7 @@
   --bgcolor-global-hs: 0,0%;
   --bgcolor-global-l: 100%;
   --bgcolor-inline-code: #{$gray-100}; //optional
-  --bgcolor-card: #{$gray-50};
+  --bgcolor-card: #{$gray-100};
   --bgcolor-blinked-section: #{hsl.alpha(var(--primary),10%)};
   // --bgcolor-keyword-highlighted: #{$grw-marker-yellow};
 
@@ -122,7 +122,7 @@
   --bordercolor-inline-code: #{$gray-400}; // optional
 
   // Dropdown colors
-  --bgcolor-dropdown-link-active: #{$growi-blue};
+  --bgcolor-dropdown-link-active: #{var.$growi-blue};
 
   // admin theme box
   --color-theme-color-box: #{hsl.lighten(var(--primary), 20%)};
@@ -155,7 +155,7 @@
   --bgcolor-inline-code: #1f1f22; //optional
   --bgcolor-card: #{hsl.darken(var(--bgcolor-global),5%)};
   --bgcolor-blinked-section: #{hsl.alpha(var(--primary), 40%)};
-  --bgcolor-keyword-highlighted: #{darken($grw-marker-red, 30%)};
+  --bgcolor-keyword-highlighted: #{darken(var.$grw-marker-red, 30%)};
 
   // Font colors
   --color-global: hsl(var(--color-global-hs),var(--color-global-l));

+ 14 - 14
packages/preset-themes/vite.themes.config.ts

@@ -9,21 +9,21 @@ export default defineConfig({
     manifest: true,
     rollupOptions: {
       input: [
-        '/src/styles/antarctic.scss',
-        '/src/styles/blackboard.scss',
-        '/src/styles/christmas.scss',
+        // '/src/styles/antarctic.scss',
+        // '/src/styles/blackboard.scss',
+        // '/src/styles/christmas.scss',
         '/src/styles/default.scss',
-        '/src/styles/fire-red.scss',
-        '/src/styles/future.scss',
-        '/src/styles/halloween.scss',
-        '/src/styles/hufflepuff.scss',
-        '/src/styles/island.scss',
-        '/src/styles/jade-green.scss',
-        '/src/styles/kibela.scss',
-        '/src/styles/mono-blue.scss',
-        '/src/styles/nature.scss',
-        '/src/styles/spring.scss',
-        '/src/styles/wood.scss',
+        // '/src/styles/fire-red.scss',
+        // '/src/styles/future.scss',
+        // '/src/styles/halloween.scss',
+        // '/src/styles/hufflepuff.scss',
+        // '/src/styles/island.scss',
+        // '/src/styles/jade-green.scss',
+        // '/src/styles/kibela.scss',
+        // '/src/styles/mono-blue.scss',
+        // '/src/styles/nature.scss',
+        // '/src/styles/spring.scss',
+        // '/src/styles/wood.scss',
       ],
       output: {
         assetFileNames: isProd