Răsfoiți Sursa

simplify scss

Yuki Takei 6 ani în urmă
părinte
comite
def4a39c16

+ 7 - 2
src/client/styles/scss/_variables-bootstrap.scss

@@ -4,8 +4,13 @@
 
 //== Colors
 //
-//## DO NOT override `$theme-colors` here.
-//## see _variables.scss, theme/_override-bootstrap-themes.scss and each theme files
+$primary: #112744;
+$info: #0d8ea5;
+$success: #00bb83;
+$warning: #ee773b;
+$danger: #ff0a54;
+$light: #dee2e6;
+$dark: #343a40;
 
 //== Typography
 //

+ 0 - 9
src/client/styles/scss/_variables.scss

@@ -2,15 +2,6 @@
 $growi-green: #74bc46;
 $growi-blue: #175fa5;
 
-//== Colors
-$grw-primary: #112744;
-$grw-info: #0d8ea5;
-$grw-success: #00bb83;
-$grw-warning: #ee773b;
-$grw-danger: #ff0a54;
-$grw-light: #dee2e6;
-$grw-dark: #343a40;
-
 $font-family-monospace-not-strictly: Monaco, Menlo, Consolas, 'Courier New', MeiryoKe_Gothic, monospace;
 
 //== Layout

+ 0 - 1
src/client/styles/scss/style-app.scss

@@ -9,7 +9,6 @@
 @import 'vendor';
 
 // override bootstrap
-@import 'theme/override-bootstrap-themes';
 @import 'override-bootstrap';
 
 // override react-bootstrap-typeahead styles

+ 2 - 2
src/client/styles/scss/theme/_apply-colors.scss

@@ -8,8 +8,6 @@
 $link-color: $color-link;
 $link-hover-color: $color-link-hover;
 
-@import 'override-bootstrap-themes';
-
 @import '~bootstrap/scss/reboot';
 
 @each $color, $value in $theme-colors {
@@ -29,6 +27,8 @@ $link-hover-color: $color-link-hover;
   .alert.alert-#{$theme-color} {
     color: white;
     background: $color;
+    border: none;
+
     a:not(.btn) {
       color: white;
 

+ 0 - 10
src/client/styles/scss/theme/_override-bootstrap-themes.scss

@@ -1,10 +0,0 @@
-// use $grw-* colors
-$theme-colors: (
-  'primary': $grw-primary,
-  'success': $grw-success,
-  'info': $grw-info,
-  'warning': $grw-warning,
-  'danger': $grw-danger,
-  'light': $grw-light,
-  'dark': $grw-dark
-);

+ 11 - 10
src/client/styles/scss/theme/default.scss

@@ -1,16 +1,17 @@
 @import '../variables';
+@import '../variables-bootstrap';
 
 // == Define colors
 //
 
 // colors for overriding bootstrap $theme-colors
-$grw-primary: #112744;
-// $grw-info: #;
-// $grw-success: #;
-// $grw-warning: #;
-// $grw-danger: #;
-// $grw-light: #;
-// $grw-dark: #;
+$primary: #112744;
+// $info: #;
+// $success: #;
+// $warning: #;
+// $danger: #;
+// $light: #;
+// $dark: #;
 
 // Background colors
 $bgcolor-global: white;
@@ -20,9 +21,9 @@ $bgcolor-inline-code: #f9f2f4;
 // Font colors
 $color-global: #333333;
 $color-header: #2b2b2b;
-$color-link: lighten($grw-primary, 20%);
+$color-link: lighten($primary, 20%);
 $color-link-hover: lighten($color-link, 20%);
-$color-link-wiki: lighten($grw-primary, 20%);
+$color-link-wiki: lighten($primary, 20%);
 $color-link-wiki-hover: lighten($color-link-wiki, 20%);
 $color-inline-code: #c7254e;
 
@@ -36,7 +37,7 @@ $active-navbar-border: lighten($navbar-border, 10%);
 
 // light mode colors
 @media (prefers-color-scheme: no-preference), (prefers-color-scheme: light) {
-  $grw-secondary: #ccc;
+  $secondary: #ccc;
 }
 
 // dark mode colors