1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00

colors unify

This commit is contained in:
codecalm
2021-10-27 21:33:31 +02:00
parent 492649e5db
commit 6e5c4021c6
6 changed files with 61 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
$margin-spacers: map-merge($spacers, (auto: auto, null: $spacer)); $margin-spacers: map-merge($spacers, (auto: auto, null: $spacer));
$border-values: ( $border-values: (
null: $border-width solid $border-color-transparent, null: $border-width solid $border-color-transparent,
wide: $border-width-wide solid $border-color-transparent, wide: $border-width-wide solid $border-color-transparent,

View File

@@ -66,10 +66,6 @@ $display-font-sizes: (
6: 2.5rem 6: 2.5rem
) !default; ) !default;
$small-font-size: percentage(divide($h5-font-size, $font-size-base)) !default;
$code-font-size: $small-font-size !default;
$code-line-height: 1.25rem !default;
$lead-font-size: $font-size-base !default; $lead-font-size: $font-size-base !default;
$lead-font-weight: $font-weight-normal !default; $lead-font-weight: $font-weight-normal !default;
@@ -139,7 +135,32 @@ $info: $azure !default;
$warning: $orange !default; $warning: $orange !default;
$danger: $red !default; $danger: $red !default;
$code-color: $primary !default; $theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark,
"muted": $text-muted
) !default;
$extra-colors: (
"blue": $blue,
"azure": $azure,
"indigo": $indigo,
"purple": $purple,
"pink": $pink,
"red": $red,
"orange": $orange,
"yellow": $yellow,
"lime": $lime,
"green": $green,
"teal": $teal,
"cyan": $cyan,
) !default;
$social-colors: ( $social-colors: (
"facebook": #3b5998, "facebook": #3b5998,
@@ -159,22 +180,6 @@ $social-colors: (
"tabler": #206bc4 "tabler": #206bc4
) !default; ) !default;
$colors: (
"blue": $blue,
"azure": $azure,
"indigo": $indigo,
"purple": $purple,
"pink": $pink,
"red": $red,
"orange": $orange,
"yellow": $yellow,
"lime": $lime,
"green": $green,
"teal": $teal,
"cyan": $cyan,
) !default;
// Dark mode // Dark mode
$dark-mode-darken: darken($dark, 2%) !default; $dark-mode-darken: darken($dark, 2%) !default;
$dark-mode-lighten: lighten($dark, 2%) !default; $dark-mode-lighten: lighten($dark, 2%) !default;
@@ -190,6 +195,12 @@ $border-radius: 4px !default;
$border-radius-lg: 8px !default; $border-radius-lg: 8px !default;
$border-radius-pill: 100rem !default; $border-radius-pill: 100rem !default;
// Code
$small-font-size: percentage(divide($h5-font-size, $font-size-base)) !default;
$code-color: $primary !default;
$code-font-size: $small-font-size !default;
$code-line-height: 1.25rem !default;
// Avatars // Avatars
$avatar-size: 2.5rem !default; $avatar-size: 2.5rem !default;
$avatar-sizes: ( $avatar-sizes: (

View File

@@ -184,7 +184,7 @@
$btn-colors: $theme-colors; $btn-colors: $theme-colors;
@if $enable-extra-colors { @if $enable-extra-colors {
$btn-colors: map-merge($btn-colors, $colors); $btn-colors: map-merge($btn-colors, $extra-colors);
} }
@if $enable-social-colors { @if $enable-social-colors {

View File

@@ -35,7 +35,7 @@
} }
@if $enable-extra-colors { @if $enable-extra-colors {
@each $color, $value in $colors { @each $color, $value in $extra-colors {
&.bg-#{$color} { &.bg-#{$color} {
border-color: $value; border-color: $value;
} }

View File

@@ -42,7 +42,7 @@
@include step-color($primary); @include step-color($primary);
} }
@each $color, $value in $colors { @each $color, $value in $extra-colors {
.steps-#{$color} { .steps-#{$color} {
@include step-color($value); @include step-color($value);
} }

View File

@@ -1,22 +1,15 @@
// stylelint-disable declaration-no-important // stylelint-disable declaration-no-important
/** @each $color, $value in $theme-colors {
SOCIAL COLORS .bg-#{"" + $color}-lt {
*/
@each $color, $value in $social-colors {
.bg-#{"" + $color} {
color: #fff !important;
background: $value !important;
}
.text-#{"" + $color} {
color: $value !important; color: $value !important;
background: theme-color-lighter($value, true) !important;
} }
} }
// Extra colors
@if $enable-extra-colors { @if $enable-extra-colors {
@each $color, $value in map-merge($colors, ( muted: $text-muted )) { @each $color, $value in $extra-colors {
.bg-#{"" + $color} { .bg-#{"" + $color} {
background: $value; background: $value;
} }
@@ -31,3 +24,22 @@ SOCIAL COLORS
} }
} }
} }
// Social colors
@if $enable-social-colors {
@each $color, $value in $social-colors {
.bg-#{"" + $color} {
color: #ffffff !important;
background: $value !important;
}
.text-#{"" + $color} {
color: $value !important;
}
.bg-#{"" + $color}-lt {
color: $value !important;
background: theme-color-lighter($value, true) !important;
}
}
}