@qrsln/lootstrap 22.2.2-beta.0 → 22.3.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +17 -6
- package/dist/css/lootstrap.css +10649 -9826
- package/dist/css/lootstrap.css.map +1 -1
- package/dist/css/lootstrap.min.css +3 -3
- package/package.json +5 -1
- package/scss/Abstracts/Functions/_color-customized.scss +62 -0
- package/scss/Abstracts/Functions/_color.scss +108 -65
- package/scss/Abstracts/Functions/_helpers.scss +2 -2
- package/scss/Abstracts/Functions/_shadow.scss +4 -4
- package/scss/Abstracts/Mixins/_color.scss +126 -136
- package/scss/Abstracts/Mixins/_theme.scss +163 -0
- package/scss/Abstracts/_dir-functions.scss +1 -0
- package/scss/Abstracts/_dir-mixins.scss +1 -4
- package/scss/Abstracts/_variables.scss +96 -35
- package/scss/Architecture/Components/TODO/_tables.scss +3 -3
- package/scss/Architecture/Components/_alert.scss +93 -19
- package/scss/Architecture/Components/_badge.scss +40 -0
- package/scss/Architecture/Components/_breadcrumb.scss +11 -10
- package/scss/Architecture/Components/_button-close.scss +11 -2
- package/scss/Architecture/Components/_buttons.scss +22 -21
- package/scss/Architecture/Components/_calendar.scss +67 -55
- package/scss/Architecture/Components/_card.scss +9 -9
- package/scss/Architecture/Components/_caret.scss +20 -20
- package/scss/Architecture/Components/_dialog.scss +10 -7
- package/scss/Architecture/Components/_list.scss +13 -13
- package/scss/Architecture/Components/_nav.scss +14 -12
- package/scss/Architecture/Components/_pagination.scss +16 -10
- package/scss/Architecture/Components/_progress.scss +6 -5
- package/scss/Architecture/Components/_rating.scss +15 -14
- package/scss/Architecture/Components/_scrollbar.scss +59 -29
- package/scss/Architecture/Components/_spinners.scss +0 -1
- package/scss/Architecture/Components/_timeline.scss +6 -5
- package/scss/Architecture/Components/_timer.scss +5 -4
- package/scss/Architecture/Components/_toasts.scss +72 -12
- package/scss/Architecture/Components/_tooltip.scss +135 -0
- package/scss/Architecture/Components/_tree-view.scss +13 -12
- package/scss/Architecture/Forms/_form-check.scss +82 -81
- package/scss/Architecture/Forms/_input-fields.scss +36 -37
- package/scss/Architecture/Forms/_selects.scss +3 -1
- package/scss/Architecture/{_anim.scss → Roots/_anim.scss} +17 -7
- package/scss/Architecture/Roots/_avatar.scss +296 -0
- package/scss/Architecture/Roots/_classified.scss +67 -0
- package/scss/Architecture/{_reboot.scss → Roots/_reboot.scss} +6 -9
- package/scss/Architecture/Roots/_root.scss +49 -0
- package/scss/Architecture/Roots/_shape.scss +92 -0
- package/scss/Architecture/Roots/_skeleton.scss +271 -0
- package/scss/Architecture/{Svg/_icons.scss → Roots/_svg.scss} +0 -0
- package/scss/Architecture/Utils/_border.scss +3 -1
- package/scss/Architecture/Utils/_color.scss +71 -88
- package/scss/Architecture/Utils/_filters.scss +4 -1
- package/scss/Architecture/Utils/_position.scss +43 -0
- package/scss/Architecture/Utils/_spacing.scss +7 -21
- package/scss/Architecture/Utils/_text.scss +42 -109
- package/scss/Architecture/Utils/_utilities.scss +55 -21
- package/scss/Architecture/__color-scheme.scss +80 -0
- package/scss/Architecture/__dir-components.scss +5 -7
- package/scss/Architecture/__dir-roots.scss +17 -0
- package/scss/Architecture/__dir-utils.scss +2 -1
- package/scss/Architecture/_theme.scss +2 -1
- package/scss/_header.scss +2 -2
- package/scss/lootstrap.scss +2 -5
- package/dist/css/test.css +0 -275
- package/dist/css/test.css.map +0 -1
- package/scss/Architecture/Components/TODO/_badge.scss +0 -7
- package/scss/Architecture/Components/TODO/_tooltip.scss +0 -7
- package/scss/Architecture/Components/_themed.scss +0 -45
- package/scss/Architecture/__dir-svg.scss +0 -7
- package/scss/Architecture/__theme-colors.scss +0 -51
- package/scss/Architecture/__theme-customized.scss +0 -51
- package/scss/Architecture/_root.scss +0 -45
- package/scss/test.scss +0 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qrsln/lootstrap",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.3.1-beta.0",
|
|
4
4
|
"description": "LootStrap is a scss library and is still in beta! There is much to improve!",
|
|
5
5
|
"style": "dist/css/lootstrap.css",
|
|
6
6
|
"sass": "scss/lootstrap.scss",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"homepage": "https://github.com/krsln/LootStrap#readme",
|
|
30
30
|
"scripts": {
|
|
31
31
|
"css": "npm-run-all cleaning header css-compile css-clean-main:SassDoesnt css-prefix-main css-minify-main",
|
|
32
|
+
"css-TEST": "npm-run-all css-compile-TEST css-clean-main-TEST:SassDoesnt",
|
|
32
33
|
"cleaning": "rimraf dist/css",
|
|
33
34
|
"testHeader": "node build/Lootstrap.sh",
|
|
34
35
|
"header": "node build/Lootstrap.js",
|
|
@@ -37,6 +38,9 @@
|
|
|
37
38
|
"css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.min.css\"",
|
|
38
39
|
"css-minify-main": "cleancss -O1 --format breakWith=lf --output dist/css/lootstrap.min.css dist/css/lootstrap.css",
|
|
39
40
|
"sass:Watch": "sass --watch scss/:dist/css/",
|
|
41
|
+
"css-compile-TEST": "sass --style expanded --source-map --embed-sources --no-error-css Tests:dist/Tests",
|
|
42
|
+
"css-clean-main-TEST:SassDoesnt": "cleancss -O1 --format beautify --output dist/Tests/lootstrap-test.css dist/Tests/lootstrap-test.css",
|
|
43
|
+
|
|
40
44
|
"/************ / ************/": " --- End --- ",
|
|
41
45
|
"p:live": "npm run css && npm publish --access public",
|
|
42
46
|
"p:beta": "npm run css && npm publish --tag beta --access public"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// ===========================================================================
|
|
2
|
+
// Functions - Color
|
|
3
|
+
// ===========================================================================
|
|
4
|
+
|
|
5
|
+
// Set Text Color Entirely based on bg color
|
|
6
|
+
//@function TextColor-ByBackground($color) {
|
|
7
|
+
// @if (lightness($color) > 80) {
|
|
8
|
+
// @return black; // Lighter background, return dark color
|
|
9
|
+
// } @else {
|
|
10
|
+
// @return white; // Darker background, return light color
|
|
11
|
+
// }
|
|
12
|
+
//}
|
|
13
|
+
|
|
14
|
+
@function Color-ByLightness($colorValue, $targetPer: 96%) {
|
|
15
|
+
$diff: $targetPer - lightness($colorValue);
|
|
16
|
+
$color-result: $colorValue;
|
|
17
|
+
|
|
18
|
+
@if ($diff>0) {
|
|
19
|
+
$color-result: lighten($colorValue, $diff);
|
|
20
|
+
} @else {
|
|
21
|
+
$diff-body: -1 * $diff;
|
|
22
|
+
$color-result: darken($colorValue, $diff-body);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@return $color-result;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// For bg, text and border color
|
|
29
|
+
/// HSL Colors: hsl(hue, saturation, lightness)
|
|
30
|
+
@function Color-hsla($colors, $alpha:--ls-bg-alpha, $lightness:--ls-bg-lightness) {
|
|
31
|
+
$colors-hsla: ();
|
|
32
|
+
@each $colorKey, $colorValue in $colors {
|
|
33
|
+
$color: $colorValue;
|
|
34
|
+
|
|
35
|
+
// Not: Dont f*ck with border color..
|
|
36
|
+
//@if (str-index($alpha, '--#{$var-Prefix}border')) {
|
|
37
|
+
// $color: Color-ByLightness($colorValue, 70%); // 80
|
|
38
|
+
// @if ($colorKey=='dark') {
|
|
39
|
+
// $color: Color-ByLightness($colorValue, 45%);
|
|
40
|
+
// } @else if ($colorKey=='night') {
|
|
41
|
+
// $color: Color-ByLightness($colorValue, 35%);
|
|
42
|
+
// } @else if ($colorKey=='light' or $colorKey=='white') {
|
|
43
|
+
// $color: Color-ByLightness($colorValue, 90%);
|
|
44
|
+
// }
|
|
45
|
+
//}
|
|
46
|
+
|
|
47
|
+
$color-h: #{round(hue($color))};
|
|
48
|
+
$color-s: #{round(saturation($color))};
|
|
49
|
+
$color-l: #{round(lightness($color))};
|
|
50
|
+
|
|
51
|
+
$alpha-bg: #{var($alpha, 1)};
|
|
52
|
+
$lightness-bg: #{var($lightness, $color-l)};
|
|
53
|
+
|
|
54
|
+
@if (str-index($alpha, '--#{$var-Prefix}border')) {
|
|
55
|
+
$lightness-bg: $color-l;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
$hsla-color: hsla($color-h, $color-s, $lightness-bg, $alpha-bg);
|
|
59
|
+
$colors-hsla: map-merge($colors-hsla, ($colorKey: $hsla-color));
|
|
60
|
+
}
|
|
61
|
+
@return $colors-hsla;
|
|
62
|
+
}
|
|
@@ -1,90 +1,133 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
1
3
|
// ===========================================================================
|
|
2
4
|
// Functions - Color
|
|
3
5
|
// ===========================================================================
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
///
|
|
9
|
-
///
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
$White: hsl(0, 0%, 100%) !default;
|
|
8
|
+
$Black: hsl(0, 0%, 0%) !default;
|
|
9
|
+
|
|
10
|
+
/// Add percentage of white to a color
|
|
11
|
+
/// Tint: is the mixture of a color with white, which increases lightness
|
|
12
|
+
/// Usage => Tint($Dark, 42%) Tint(red, 42%) Tint(#BADA55, 42%)
|
|
13
|
+
@function Tint($color, $percent) {
|
|
14
|
+
@return mix(white, $color, $percent);
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
///
|
|
15
|
-
///
|
|
16
|
-
///
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@function Shade($color, $percentage) {
|
|
20
|
-
@return mix(black, $color, $percentage);
|
|
17
|
+
/// Add percentage of black to a color
|
|
18
|
+
/// Shade: is the mixture of a color with black, which reduces lightness
|
|
19
|
+
/// Usage => Shade($Light, 42%) Shade(red, 42%) Shade(#663399, 42%)
|
|
20
|
+
@function Shade($color, $percent) {
|
|
21
|
+
@return mix(black, $color, $percent);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@return white; // Darker background, return light color
|
|
29
|
-
}
|
|
24
|
+
/// Usage => --warning-rgb: #{hexToRGB($Warning)};
|
|
25
|
+
/// res => --warning-rgb: 230, 172, 0;
|
|
26
|
+
/// background-color: #{rgba(var(--warning-rgb), .5)};
|
|
27
|
+
@function colorToRGB($hex) {
|
|
28
|
+
@return red($hex), green($hex), blue($hex);
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
/// Usage => --warning-hls: #{colorToHSL($Warning)};
|
|
32
|
+
/// res => --warning-hls: 45deg, 100%, 45%;
|
|
33
|
+
/// background-color: #{hsla(var(--warning-hls), .5)};
|
|
34
|
+
@function colorToHSL($color) {
|
|
35
|
+
@return round(hue($color)), round(saturation($color)), round(lightness($color));
|
|
36
|
+
}
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
/*#region Color functions */
|
|
39
|
+
|
|
40
|
+
/// Color Relative Luminance Calculator
|
|
41
|
+
/// Relative luminance follows the photometric definition of luminance, but with the values normalized to 1 or 100 for a reference white.
|
|
42
|
+
///
|
|
43
|
+
/// Usage => Luminance($Dark)
|
|
44
|
+
/// Tested => https://contrastchecker.online/color-relative-luminance-calculator
|
|
45
|
+
/// Adapted from: https://gist.github.com/voxpelli/6304812
|
|
46
|
+
@function Luminance($color) {
|
|
47
|
+
// Adapted from: https://github.com/LeaVerou/contrast-ratio/blob/gh-pages/color.js
|
|
48
|
+
// Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
49
|
+
$rgba: red($color), green($color), blue($color);
|
|
50
|
+
$rgba2: ();
|
|
51
|
+
|
|
52
|
+
@for $i from 1 through 3 {
|
|
53
|
+
$rgb: nth($rgba, $i);
|
|
54
|
+
$rgb: math.div($rgb, 255);
|
|
55
|
+
|
|
56
|
+
//$rgb: if($rgb < .03928, $rgb / 12.92, ch-pow(($rgb + .055) / 1.055, 2.4, 16));
|
|
57
|
+
$rgb: if($rgb < .03928, math.div($rgb, 12.92), math.pow(math.div($rgb + 0.055, 1.055), 2.4));
|
|
58
|
+
|
|
59
|
+
$rgba2: append($rgba2, $rgb);
|
|
41
60
|
}
|
|
42
61
|
|
|
43
|
-
@return $
|
|
62
|
+
@return .2126 * nth($rgba2, 1) + .7152 * nth($rgba2, 2) + 0.0722 * nth($rgba2, 3);
|
|
44
63
|
}
|
|
45
64
|
|
|
46
|
-
///
|
|
47
|
-
///
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
} @else if ($colorKey=='night') {
|
|
58
|
-
$color: Color-ByLightness($colorValue, 35%);
|
|
59
|
-
} @else if ($colorKey=='light' or $colorKey=='white') {
|
|
60
|
-
$color: Color-ByLightness($colorValue, 90%);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
65
|
+
/// Calculate contrast ratio of foreground and background colors and check for Web Content Accessibility Guidelines (WCAG) https://www.w3.org/WAI/standards-guidelines/wcag/.
|
|
66
|
+
///
|
|
67
|
+
// Usage => ContrastRatio($Dark, $Light)
|
|
68
|
+
/// Tested => https://contrastchecker.online/
|
|
69
|
+
/// Tested => https://coolors.co/contrast-checker/2b2b31-fafafa
|
|
70
|
+
@function ContrastRatio($color1, $color2) {
|
|
71
|
+
// Adapted from: https://github.com/LeaVerou/contrast-ratio/blob/gh-pages/color.js
|
|
72
|
+
// Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
|
|
73
|
+
$luminance1: Luminance($color1) + .05;
|
|
74
|
+
$luminance2: Luminance($color2) + .05;
|
|
75
|
+
$ratio: math.div($luminance1, $luminance2);
|
|
63
76
|
|
|
64
|
-
|
|
65
|
-
$
|
|
66
|
-
|
|
77
|
+
@if $luminance2 > $luminance1 {
|
|
78
|
+
$ratio: math.div(1, $ratio);
|
|
79
|
+
}
|
|
67
80
|
|
|
68
|
-
|
|
69
|
-
$lightness-bg: #{var($lightness, $color-l)};
|
|
81
|
+
$ratio: math.div(round($ratio * 1000), 1000);
|
|
70
82
|
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
@return $ratio;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/// Get best Text Color From array, based on bg color
|
|
87
|
+
/// Usage => Best-fg-color($Dark)
|
|
88
|
+
@function Best-fg-color($base, $colors: ($Black, $White), $tolerance: 0) {
|
|
89
|
+
$best: nth($colors, 1);
|
|
90
|
+
$contrast: ContrastRatio($base, $best);
|
|
91
|
+
|
|
92
|
+
@for $i from 2 through length($colors) {
|
|
93
|
+
$currentColor: nth($colors, $i);
|
|
94
|
+
$currentContrast: ContrastRatio($base, $currentColor);
|
|
95
|
+
@if ($currentContrast - $contrast > $tolerance) {
|
|
96
|
+
$best: $currentColor;
|
|
97
|
+
$contrast: $currentContrast;
|
|
73
98
|
}
|
|
99
|
+
}
|
|
74
100
|
|
|
75
|
-
|
|
76
|
-
$
|
|
101
|
+
@if ($contrast < 3) {
|
|
102
|
+
@warn "Contrast ratio of #{$best} on #{$base} is pretty bad, just #{$contrast}";
|
|
77
103
|
}
|
|
78
|
-
|
|
104
|
+
|
|
105
|
+
@return $best;
|
|
79
106
|
}
|
|
80
107
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
108
|
+
/*#endregion */
|
|
109
|
+
|
|
110
|
+
/*#region Color functions :: depressed */
|
|
111
|
+
|
|
112
|
+
/// Dynamic text color
|
|
113
|
+
@function Text-clr($color) {
|
|
114
|
+
@if (lightness( $color ) > 50) {
|
|
115
|
+
@return $Black; //#000; // Lighter background, return dark color
|
|
116
|
+
} @else {
|
|
117
|
+
@return $White; //#fff; // Darker background, return light color
|
|
118
|
+
}
|
|
119
|
+
}
|
|
86
120
|
|
|
87
|
-
|
|
121
|
+
/// Set Text Color Entirely based on bg color (Black or White)
|
|
122
|
+
/// Usage => @include Text-color($Warning);
|
|
123
|
+
@function Text-color($n) {
|
|
124
|
+
$color-brightness: round((red($n)*299)+(green($n)*587)+ math.div(blue($n) * 114, 1000));
|
|
125
|
+
$light-color: round((red(#ffffff)*299)+(green(#ffffff)*587)+ math.div(blue(#ffffff) * 114, 1000));
|
|
126
|
+
@if abs($color-brightness) < math.div($light-color, 2) {
|
|
127
|
+
@return $White;
|
|
128
|
+
} @else {
|
|
129
|
+
@return $Black;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
88
132
|
|
|
89
|
-
|
|
90
|
-
}
|
|
133
|
+
/*#endregion */
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
// ===========================================================================
|
|
4
4
|
@use 'sass:math';
|
|
5
5
|
|
|
6
|
-
/// Remove the unit of a
|
|
6
|
+
/// Remove the unit of a value
|
|
7
7
|
/// @param {Number} $number - Number to remove unit from
|
|
8
|
-
/// @return {Number} - Unit-less
|
|
8
|
+
/// @return {Number} - Unit-less value
|
|
9
9
|
@function strip-unit($number) {
|
|
10
10
|
@if type-of($number) == 'number' and not unitless($number) {
|
|
11
11
|
//@return $number / ($number * 0 + 1);
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
both#{$suffix} : $result-both,
|
|
58
58
|
br#{$suffix} : $result-br,
|
|
59
59
|
t#{$suffix} : $result-t,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
e#{$suffix} : $result-r,
|
|
61
|
+
s#{$suffix} : $result-l,
|
|
62
62
|
b#{$suffix} : $result-b,
|
|
63
63
|
x#{$suffix} : $result-x,
|
|
64
64
|
y#{$suffix} : $result-y,
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
/// Based on $Shadow: 0px 1px 1px -1px rgba($Black, 0.18), 0px 2px 2px 0px rgba($Black, 0.12), 0px 4px 6px 0px rgba($Black, 0.06);
|
|
103
103
|
@function Colored-shadow($color: black) {
|
|
104
104
|
// using best result of shadow set
|
|
105
|
-
@return 0 1px 1px -1px
|
|
105
|
+
@return 0 1px 1px -1px hsla($color, 0.27), 0px 2px 2px 0px hsla($color, 0.18), 0px 4px 6px 0px hsla($color, 0.09);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
@function Colored-shadow-inner($color: black) {
|
|
109
109
|
// using best result of shadow set
|
|
110
|
-
@return 0 0 1px 0
|
|
110
|
+
@return 0 0 1px 0 hsla($color, 0.27) inset, 0 0 2px 0 hsla($color, 0.18) inset, 0 0 6px 0 hsla($color, 0.09) inset;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// box-shadow: Shadow-mixer($Shadow, $Shadow-inner);
|
|
@@ -1,141 +1,131 @@
|
|
|
1
1
|
// ===========================================================================
|
|
2
2
|
// Mixins - Color
|
|
3
3
|
// ===========================================================================
|
|
4
|
-
// CSS Variables (Custom Properties)
|
|
5
|
-
|
|
6
|
-
@mixin Bg-Text-Border-variables($colors) {
|
|
7
|
-
@each $colorKey, $colorValue in $colors {
|
|
8
|
-
.Bg-#{$colorKey} {
|
|
9
|
-
--#{$var-Prefix}bg-lightness: #{lightness($colorValue)};
|
|
10
|
-
--#{$var-Prefix}bg-alpha: 1;
|
|
11
|
-
//color: #{TextColor-ByBackground($colorValue)}; // DON'T
|
|
12
|
-
}
|
|
13
|
-
.Text-#{$colorKey} {
|
|
14
|
-
--#{$var-Prefix}text-lightness: #{lightness($colorValue)};
|
|
15
|
-
--#{$var-Prefix}text-alpha: 1;
|
|
16
|
-
}
|
|
17
|
-
.Border-#{$colorKey} {
|
|
18
|
-
--#{$var-Prefix}border-alpha: 1;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@mixin Theme-components($theme-colors, $theme-components) {
|
|
24
|
-
@each $colorKey, $colorValue in $theme-colors {
|
|
25
|
-
$fg-muted: hsla(213, 11%, 69%, 1);
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
// Colors: primary, secondary, success, info, warning, danger
|
|
29
|
-
*/
|
|
30
|
-
$color-body: Color-ByLightness($colorValue, 96%); // 96% - DON'T CHANGE
|
|
31
|
-
$color-border: Color-ByLightness($colorValue, 70%); // 80
|
|
32
|
-
$color-shadow-rgb: 0, 0, 0 ; // Has to be this way.. check shadows
|
|
33
|
-
|
|
34
|
-
$color-active: lighten($colorValue, 10%);
|
|
35
|
-
$color-surface: Color-ByLightness($colorValue, 90%); // 90% - DON'T CHANGE
|
|
36
|
-
|
|
37
|
-
$color-lightest: Color-ByLightness($colorValue, 95%); // 95% - DON'T CHANGE
|
|
38
|
-
$color-light: Color-ByLightness($colorValue, 85);
|
|
39
|
-
$color-dark: lighten($colorValue, 20%);
|
|
40
|
-
$color-darkest: $colorValue;
|
|
41
|
-
|
|
42
|
-
/*
|
|
43
|
-
// Colors: dark, night, light
|
|
44
|
-
*/
|
|
45
|
-
@if ($colorKey=='dark') {
|
|
46
|
-
$color-body: Color-ByLightness($colorValue, 10%);
|
|
47
|
-
$color-border: Color-ByLightness($colorValue, 45%);
|
|
48
|
-
$color-shadow-rgb: 255, 255, 255 ;
|
|
49
|
-
|
|
50
|
-
$color-active: Color-ByLightness($Purple, 60%); // #bb86fc;
|
|
51
|
-
$color-surface: Color-ByLightness($colorValue, 30%);
|
|
52
|
-
|
|
53
|
-
$color-lightest: Color-ByLightness($colorValue, 40%);
|
|
54
|
-
$color-light: Color-ByLightness($colorValue, 50%);
|
|
55
|
-
$color-dark: Color-ByLightness($colorValue, 25%);
|
|
56
|
-
$color-darkest: Color-ByLightness($colorValue, 15%);
|
|
57
|
-
}
|
|
58
|
-
@if ($colorKey=='night') {
|
|
59
|
-
$color-body: Color-ByLightness($colorValue, 5%);
|
|
60
|
-
$color-border: Color-ByLightness($colorValue, 35%);
|
|
61
|
-
$color-shadow-rgb: 255, 255, 255 ;
|
|
62
|
-
|
|
63
|
-
$color-active: Color-ByLightness($Purple, 60%); // #bb86fc;
|
|
64
|
-
$color-surface: Color-ByLightness($colorValue, 20%);
|
|
65
|
-
|
|
66
|
-
$color-lightest: Color-ByLightness($colorValue, 30%);
|
|
67
|
-
$color-light: Color-ByLightness($colorValue, 40%);
|
|
68
|
-
$color-dark: Color-ByLightness($colorValue, 15%);
|
|
69
|
-
$color-darkest: Color-ByLightness($colorValue, 10%);
|
|
70
|
-
}
|
|
71
|
-
@if ($colorKey=='light' or $colorKey=='white') {
|
|
72
|
-
$color-body: Color-ByLightness($colorValue, 85%);
|
|
73
|
-
$color-border: Color-ByLightness($colorValue, 90%);
|
|
74
|
-
|
|
75
|
-
$color-active: Color-ByLightness($Blue, 60%); // #bb86fc;
|
|
76
|
-
$color-surface: Color-ByLightness($colorValue, 100%);
|
|
77
4
|
|
|
78
|
-
|
|
79
|
-
$color-light: Color-ByLightness($colorValue, 97%);
|
|
80
|
-
$color-dark: Color-ByLightness($colorValue, 95%);
|
|
81
|
-
$color-darkest: Color-ByLightness($colorValue, 90%);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/*
|
|
85
|
-
// Colors: primary, secondary, success, info, warning, danger, dark, night, light
|
|
86
|
-
*/
|
|
87
|
-
@each $comKey, $comValue in $theme-components {
|
|
88
|
-
$class-suffix: if($colorKey, if($comKey == "" , "", "-") + $colorKey, "");
|
|
89
|
-
$component-infix: if($comValue == null, "", "#{$comValue}-");
|
|
90
|
-
|
|
91
|
-
// .Theme-primary {
|
|
92
|
-
.#{$comKey + $class-suffix} {
|
|
93
|
-
&:not(.#{$comKey}-outline) .Btn-close {
|
|
94
|
-
@if (lightness($colorValue) < 80) {
|
|
95
|
-
filter: invert(1) grayscale(100%) brightness(200%);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/*
|
|
100
|
-
// Background colors
|
|
101
|
-
*/
|
|
102
|
-
--#{$var-Prefix}#{$component-infix}bg: #{$colorValue};
|
|
103
|
-
--#{$var-Prefix}#{$component-infix}bg-hsl: #{Color-ToHSL($colorValue)};
|
|
104
|
-
|
|
105
|
-
--#{$var-Prefix}#{$component-infix}bg-body: #{$color-body};
|
|
106
|
-
--#{$var-Prefix}#{$component-infix}bg-active: #{$color-active};
|
|
107
|
-
--#{$var-Prefix}#{$component-infix}bg-active-hsl: #{Color-ToHSL($color-active)};
|
|
108
|
-
|
|
109
|
-
--#{$var-Prefix}#{$component-infix}bg-surface: #{$color-surface};
|
|
110
|
-
--#{$var-Prefix}#{$component-infix}bg-lightest: #{$color-lightest};
|
|
111
|
-
--#{$var-Prefix}#{$component-infix}bg-light: #{$color-light};
|
|
112
|
-
--#{$var-Prefix}#{$component-infix}bg-dark: #{$color-dark};
|
|
113
|
-
--#{$var-Prefix}#{$component-infix}bg-darkest: #{$color-darkest};
|
|
114
|
-
|
|
115
|
-
/*
|
|
116
|
-
// Foreground colors
|
|
117
|
-
*/
|
|
118
|
-
--#{$var-Prefix}#{$component-infix}fg-muted: #{$fg-muted};
|
|
119
|
-
|
|
120
|
-
--#{$var-Prefix}#{$component-infix}fg-body: #{TextColor-ByBackground($color-body)};
|
|
121
|
-
--#{$var-Prefix}#{$component-infix}fg-active: #{TextColor-ByBackground($color-active)};
|
|
122
|
-
|
|
123
|
-
--#{$var-Prefix}#{$component-infix}fg-surface: #{TextColor-ByBackground($color-surface)};
|
|
124
|
-
--#{$var-Prefix}#{$component-infix}fg-lightest: #{TextColor-ByBackground($color-lightest)};
|
|
125
|
-
--#{$var-Prefix}#{$component-infix}fg-light: #{TextColor-ByBackground($color-light)};
|
|
126
|
-
--#{$var-Prefix}#{$component-infix}fg-dark: #{TextColor-ByBackground($color-dark)};
|
|
127
|
-
--#{$var-Prefix}#{$component-infix}fg-darkest: #{TextColor-ByBackground($color-darkest)};
|
|
128
|
-
|
|
129
|
-
/* Shadows */
|
|
130
|
-
--#{$var-Prefix}#{$component-infix}shadow-color-rgb: #{$color-shadow-rgb};
|
|
131
|
-
|
|
132
|
-
/* Border */
|
|
133
|
-
$color-border-hsla: Color-ToHSL($color-border);
|
|
5
|
+
// CSS Variables (Custom Properties)
|
|
134
6
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
7
|
+
//@mixin Theme-components($theme-colors, $theme-components) {
|
|
8
|
+
// $var-ls: $var-Prefix; // ls-
|
|
9
|
+
//
|
|
10
|
+
// $light-Primary: hsl(265, 100%, 47%); // #6400F0
|
|
11
|
+
// $light-Primary-variant: hsl(258, 100%, 35%); // #3600B3
|
|
12
|
+
// $light-Secondary: hsl(174, 96%, 44%); // #04DCC6
|
|
13
|
+
// $light-Secondary-variant: hsl(180, 100%, 26%); // #008585
|
|
14
|
+
//
|
|
15
|
+
// $dark-Primary: hsl(267, 95%, 76%); // #BC88FC
|
|
16
|
+
// $dark-Primary-variant: hsl(258, 100%, 35%); // #3600B3
|
|
17
|
+
// $dark-Secondary: hsl(174, 96%, 44%); // #04DCC6 Secondary
|
|
18
|
+
//
|
|
19
|
+
// $fg-muted: hsla(213, 11%, 69%, 1);
|
|
20
|
+
//
|
|
21
|
+
// @each $colorKey, $colorValue in $theme-colors {
|
|
22
|
+
// $color-lightness: lightness($colorValue);
|
|
23
|
+
// /*
|
|
24
|
+
// // Colors: primary, secondary, success, info, warning, danger
|
|
25
|
+
// */
|
|
26
|
+
// $color-body: Color-ByLightness($colorValue, 90%); // 90% - DON'T CHANGE
|
|
27
|
+
// $color-border: Color-ByLightness($colorValue, 85%); // 80
|
|
28
|
+
// $color-shadow-rgb: 0, 0, 0 ; // Has to be this way.. check shadows
|
|
29
|
+
//
|
|
30
|
+
// $color-primary: $colorValue; // lighten($colorValue, 10%);
|
|
31
|
+
// $color-surface: Color-ByLightness($colorValue, 96%); // 96% - DON'T CHANGE
|
|
32
|
+
//
|
|
33
|
+
// $color-lightest: Color-ByLightness($colorValue, 94%); // 95% - DON'T CHANGE
|
|
34
|
+
// $color-light: Color-ByLightness($colorValue, ($color-lightness + 36));
|
|
35
|
+
// $color-dark: Color-ByLightness($colorValue, ($color-lightness + 18));
|
|
36
|
+
// $color-darkest: $colorValue;
|
|
37
|
+
//
|
|
38
|
+
// /*
|
|
39
|
+
// // Colors: dark, night, light
|
|
40
|
+
// */
|
|
41
|
+
// @if ($colorKey=='dark' or $colorKey=='night') {
|
|
42
|
+
// /*
|
|
43
|
+
// Rules:
|
|
44
|
+
// - Body is darkest
|
|
45
|
+
// - Surface is second darkest
|
|
46
|
+
// - lightness: $Night 7%, $Dark 18%
|
|
47
|
+
// */
|
|
48
|
+
// $color-body: Color-ByLightness($colorValue, ($color-lightness - 6));
|
|
49
|
+
// $color-border: Color-ByLightness($colorValue, ($color-lightness + 10));
|
|
50
|
+
// $color-shadow-rgb: 255, 255, 255;
|
|
51
|
+
//
|
|
52
|
+
// $color-primary: $dark-Primary;
|
|
53
|
+
// $color-surface: $colorValue;
|
|
54
|
+
//
|
|
55
|
+
// $color-lightest: Color-ByLightness($colorValue, ($color-lightness + 16));
|
|
56
|
+
// $color-light: Color-ByLightness($colorValue, ($color-lightness + 12));
|
|
57
|
+
// $color-dark: Color-ByLightness($colorValue, ($color-lightness + 8));
|
|
58
|
+
// $color-darkest: Color-ByLightness($colorValue, ($color-lightness + 4));
|
|
59
|
+
// }
|
|
60
|
+
// @if ($colorKey=='light') {
|
|
61
|
+
// /*
|
|
62
|
+
// Rules:
|
|
63
|
+
// - Reversed
|
|
64
|
+
// - lightness: 98% #fafafa rgb(250, 250, 250)
|
|
65
|
+
// */
|
|
66
|
+
// $color-body: Color-ByLightness($colorValue, ($color-lightness - 5));
|
|
67
|
+
// $color-border: Color-ByLightness($colorValue, ($color-lightness - 10));
|
|
68
|
+
//
|
|
69
|
+
// $color-primary: $light-Primary; // #6400f0;
|
|
70
|
+
// $color-surface: Color-ByLightness($colorValue, ($color-lightness + 2)); // #fff
|
|
71
|
+
//
|
|
72
|
+
// $color-lightest: $colorValue;
|
|
73
|
+
// $color-light: Color-ByLightness($colorValue, ($color-lightness - 2));
|
|
74
|
+
// $color-dark: Color-ByLightness($colorValue, ($color-lightness - 4));
|
|
75
|
+
// $color-darkest: Color-ByLightness($colorValue, ($color-lightness - 8));
|
|
76
|
+
// }
|
|
77
|
+
//
|
|
78
|
+
// /*
|
|
79
|
+
// // Colors: primary, secondary, success, info, warning, danger, dark, night, light
|
|
80
|
+
// */
|
|
81
|
+
// @each $comKey, $comValue in $theme-components {
|
|
82
|
+
// $class-suffix: if($colorKey, if($comKey == "" , "", "-") + $colorKey, "");
|
|
83
|
+
// $component-infix: if($comValue == null, "", "#{$comValue}-");
|
|
84
|
+
//
|
|
85
|
+
// // .Theme-primary {
|
|
86
|
+
// .#{$comKey + $class-suffix} {
|
|
87
|
+
// &:not(.#{$comKey}-outline) .Btn-close {
|
|
88
|
+
// @if (lightness($colorValue) < 80) {
|
|
89
|
+
// filter: invert(1) grayscale(100%) brightness(200%);
|
|
90
|
+
// }
|
|
91
|
+
// }
|
|
92
|
+
//
|
|
93
|
+
// /*
|
|
94
|
+
// // Background colors
|
|
95
|
+
// */
|
|
96
|
+
// --#{$var-ls}#{$component-infix}bg: #{$colorValue};
|
|
97
|
+
// --#{$var-ls}#{$component-infix}bg-hsl: #{colorToHSL($colorValue)};
|
|
98
|
+
//
|
|
99
|
+
// --#{$var-ls}#{$component-infix}bg-body: #{$color-body};
|
|
100
|
+
// --#{$var-ls}#{$component-infix}bg-active: #{$color-primary};
|
|
101
|
+
// --#{$var-ls}#{$component-infix}bg-active-hsl: #{colorToHSL($color-primary)};
|
|
102
|
+
//
|
|
103
|
+
// --#{$var-ls}#{$component-infix}bg-surface: #{$color-surface};
|
|
104
|
+
// --#{$var-ls}#{$component-infix}bg-lightest: #{$color-lightest};
|
|
105
|
+
// --#{$var-ls}#{$component-infix}bg-light: #{$color-light};
|
|
106
|
+
// --#{$var-ls}#{$component-infix}bg-dark: #{$color-dark};
|
|
107
|
+
// --#{$var-ls}#{$component-infix}bg-darkest: #{$color-darkest};
|
|
108
|
+
//
|
|
109
|
+
// /*
|
|
110
|
+
// // Foreground colors
|
|
111
|
+
// */
|
|
112
|
+
// --#{$var-ls}#{$component-infix}fg-muted: #{$fg-muted};
|
|
113
|
+
//
|
|
114
|
+
// --#{$var-ls}#{$component-infix}fg-body: #{Best-fg-color($color-body)};
|
|
115
|
+
// --#{$var-ls}#{$component-infix}fg-active: #{Best-fg-color($color-primary)};
|
|
116
|
+
//
|
|
117
|
+
// --#{$var-ls}#{$component-infix}fg-surface: #{Best-fg-color($color-surface)};
|
|
118
|
+
// --#{$var-ls}#{$component-infix}fg-lightest: #{Best-fg-color($color-lightest)};
|
|
119
|
+
// --#{$var-ls}#{$component-infix}fg-light: #{Best-fg-color($color-light)};
|
|
120
|
+
// --#{$var-ls}#{$component-infix}fg-dark: #{Best-fg-color($color-dark)};
|
|
121
|
+
// --#{$var-ls}#{$component-infix}fg-darkest: #{Best-fg-color($color-darkest)};
|
|
122
|
+
//
|
|
123
|
+
// /* Shadows */
|
|
124
|
+
// --#{$var-ls}#{$component-infix}shadow-color-rgb: #{$color-shadow-rgb};
|
|
125
|
+
//
|
|
126
|
+
// /* Border */
|
|
127
|
+
// --#{$var-ls}#{$component-infix}border-color-hsl: #{colorToHSL($color-border)};
|
|
128
|
+
// }
|
|
129
|
+
// }
|
|
130
|
+
// }
|
|
131
|
+
//}
|