@nulllogic/scssleon 1.0.6 → 1.0.7
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 +18 -2
- package/package.json +2 -2
- package/scss/_base.scss +3 -16
- package/scss/_content.scss +5 -22
- package/scss/_mixins.scss +2 -1
- package/scss/mixins/generators/_components.scss +2 -17
- package/scss/mixins/generators/_properties.scss +41 -46
- package/scss/themes/_default.scss +4 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="left">
|
|
2
2
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/header_dark.jpg">
|
|
4
4
|
<img alt="SCSSleon framework" src="./.imgs/header.jpg">
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
@@ -19,7 +19,7 @@ Welcome to SCSSLEON framework ! It's the most advanced responsive front-end fram
|
|
|
19
19
|
|
|
20
20
|
## Table of Contents
|
|
21
21
|
<details>
|
|
22
|
-
<summary>↪
|
|
22
|
+
<summary>↪ ≡˚ ✧ ━━━━⊱TOC⊰━━━━ ✧ ₊˚≡</summary>
|
|
23
23
|
<br />
|
|
24
24
|
|
|
25
25
|
- [Why SCSSLEON?](#user-content---why-scssleon--)
|
|
@@ -214,6 +214,22 @@ npm run sass-dev
|
|
|
214
214
|
|
|
215
215
|
## ┌ 📺 Showcase ┐
|
|
216
216
|
|
|
217
|
+
<table width="100%" border="0" colspan="0" rowspan="0">
|
|
218
|
+
<tr>
|
|
219
|
+
<td width="50%">
|
|
220
|
+
<a href="https://nulllogic.github.io/scssleon-docs/" target="_blank" title="SCSSleon documentation"><picture>
|
|
221
|
+
<img alt="SCSSleon framework" src="./.imgs/showcase/1.jpg">
|
|
222
|
+
</picture></a>
|
|
223
|
+
</td>
|
|
224
|
+
<td>2</td>
|
|
225
|
+
</tr>
|
|
226
|
+
<tr>
|
|
227
|
+
<td>1</td>
|
|
228
|
+
<td>2</td>
|
|
229
|
+
</td>
|
|
230
|
+
</tr>
|
|
231
|
+
</table>
|
|
232
|
+
|
|
217
233
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
218
234
|
|
|
219
235
|
<hr />
|
package/package.json
CHANGED
package/scss/_base.scss
CHANGED
|
@@ -21,7 +21,7 @@ html {
|
|
|
21
21
|
color-scheme: string.unquote($color_scheme);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// data-theme attribute is changing the color scheme
|
|
24
|
+
// [data-theme] attribute is changing the color scheme
|
|
25
25
|
html[data-theme="dark"] {
|
|
26
26
|
color-scheme: dark
|
|
27
27
|
}
|
|
@@ -32,21 +32,8 @@ html[data-theme="light"] {
|
|
|
32
32
|
|
|
33
33
|
@each $tag, $properties in functions.get-theme($theme, 'html') {
|
|
34
34
|
@each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
#{$tag} {
|
|
38
|
-
@include mixins.generate-properties(#{$tag}, $properties, $config, (
|
|
39
|
-
scheme: $scheme,
|
|
40
|
-
));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@if $scheme == 'dark' {
|
|
45
|
-
[data-theme="#{$scheme}"] #{$tag} {
|
|
46
|
-
@include mixins.generate-properties(#{$tag}, $properties, $config, (
|
|
47
|
-
scheme: $scheme,
|
|
48
|
-
));
|
|
49
|
-
}
|
|
35
|
+
#{$tag} {
|
|
36
|
+
@include mixins.generate-properties(#{$tag}, $properties, $config);
|
|
50
37
|
}
|
|
51
38
|
}
|
|
52
39
|
}
|
package/scss/_content.scss
CHANGED
|
@@ -17,32 +17,15 @@ $color_scheme: functions.get-config($config, 'color-scheme');
|
|
|
17
17
|
@if ($is-content-enabled) {
|
|
18
18
|
@each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
.content {
|
|
22
|
-
@each $tag, $properties in functions.get-theme($theme, 'content') {
|
|
20
|
+
.content {
|
|
21
|
+
@each $tag, $properties in functions.get-theme($theme, 'content') {
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
scheme: $scheme,
|
|
28
|
-
));
|
|
29
|
-
}
|
|
23
|
+
// Only apply styling to elements, that stand right after `.content` class
|
|
24
|
+
& > #{$tag} {
|
|
25
|
+
@include mixins.generate-properties(#{$tag}, $properties, $config);
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
29
|
|
|
34
|
-
@if $scheme == 'dark' {
|
|
35
|
-
.content:where([data-theme="#{$scheme}"], [data-theme="#{$scheme}"] *) {
|
|
36
|
-
@each $tag, $properties in functions.get-theme($theme, 'content') {
|
|
37
|
-
|
|
38
|
-
// Only apply styling to elements, that stand right after `.content` class
|
|
39
|
-
& > #{$tag} {
|
|
40
|
-
@include mixins.generate-properties(#{$tag}, $properties, $config, (
|
|
41
|
-
scheme: $scheme,
|
|
42
|
-
));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
30
|
}
|
|
48
31
|
}
|
package/scss/_mixins.scss
CHANGED
|
@@ -22,23 +22,8 @@
|
|
|
22
22
|
$theme-component: $component;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
@if $scheme == 'light' {
|
|
28
|
-
.#{$class} {
|
|
29
|
-
@include properties.generate-properties($class, $theme-component, $config, map.deep-merge((
|
|
30
|
-
scheme: $scheme,
|
|
31
|
-
), $options));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@if $scheme == 'dark' {
|
|
36
|
-
.#{$class}:where([data-theme="#{$scheme}"], [data-theme="#{$scheme}"] *) {
|
|
37
|
-
@include properties.generate-properties($class, $theme-component, $config, map.deep-merge((
|
|
38
|
-
scheme: $scheme,
|
|
39
|
-
), $options));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
25
|
+
.#{$class} {
|
|
26
|
+
@include properties.generate-properties($class, $theme-component, $config, $options);
|
|
42
27
|
}
|
|
43
28
|
|
|
44
29
|
}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
$variable_options_custom_name: functions.get-config($options, 'variable.name');
|
|
56
56
|
$variable_options_exclude: functions.get-config($options, 'variable.exclude');
|
|
57
57
|
|
|
58
|
-
$variable_name
|
|
58
|
+
$variable_name: $tag;
|
|
59
59
|
|
|
60
60
|
@if ($variable_options_custom_name != nil) {
|
|
61
61
|
$variable_name: $variable_options_custom_name;
|
|
@@ -84,15 +84,22 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
@mixin generate-colors($tag, $value, $config, $options
|
|
87
|
+
@mixin generate-colors($tag, $value, $config, $options) {
|
|
88
88
|
$prefix: functions.get-config($config, 'prefix');
|
|
89
89
|
|
|
90
90
|
@each $color, $color-properties in $value {
|
|
91
|
-
@if ($color ==
|
|
91
|
+
@if ($color == 'light') {
|
|
92
92
|
@each $color-property, $color-value in $color-properties {
|
|
93
93
|
@include generate-css-properties($tag, $color-property, $color-value, $config, $options);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
@if ($color == 'dark') {
|
|
97
|
+
&:where([data-theme="#{$color}"], [data-theme="#{$color}"] *) {
|
|
98
|
+
@each $color-property, $color-value in $color-properties {
|
|
99
|
+
@include generate-css-properties($tag, $color-property, $color-value, $config, $options);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
96
103
|
}
|
|
97
104
|
}
|
|
98
105
|
|
|
@@ -160,55 +167,43 @@
|
|
|
160
167
|
$prefix: functions.get-config($config, 'prefix');
|
|
161
168
|
$is_scheme_dark: functions.get-config($options, 'scheme') != nil and functions.get-config($options, 'scheme') == 'dark';
|
|
162
169
|
|
|
163
|
-
@
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Colors
|
|
175
|
-
@else if ($property == '_colors') {
|
|
176
|
-
@include generate-colors($tag, $value, $config, $options, 'light');
|
|
177
|
-
}
|
|
170
|
+
@each $property, $value in $properties {
|
|
171
|
+
// Variables
|
|
172
|
+
// Looking for "--" symbols in the beginning of the property
|
|
173
|
+
// Example: --flex-direction : row
|
|
174
|
+
@if (
|
|
175
|
+
meta.type-of($property) == 'string' and string.index($property, "--") == 1
|
|
176
|
+
) {
|
|
177
|
+
@include generate-css-properties($tag, $property, $value, $config, $options);
|
|
178
|
+
}
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
// Colors
|
|
181
|
+
@else if ($property == '_colors') {
|
|
182
|
+
@include generate-colors($tag, $value, $config, $options);
|
|
183
|
+
}
|
|
183
184
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
}
|
|
185
|
+
// Responsive
|
|
186
|
+
@else if ($property == '_responsive') {
|
|
187
|
+
@include generate-responsive($tag, $value, $config);
|
|
188
|
+
}
|
|
190
189
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
// Sub classes
|
|
191
|
+
@else if ($property == '_subclasses') {
|
|
192
|
+
@each $class, $class_properties in $value {
|
|
193
|
+
@include generate-subclasses($tag, $class, $class_properties, $config, $options);
|
|
194
194
|
}
|
|
195
|
+
}
|
|
195
196
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
} @else {
|
|
200
|
-
@include generate-css-variables($tag, $property, $value, $config, $options);
|
|
201
|
-
}
|
|
197
|
+
// At-rules
|
|
198
|
+
@else if ($property == '_atrule') {
|
|
199
|
+
@include generate-atrule($tag, $value, $config, $options);
|
|
202
200
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
@include generate-subclasses($tag, $class, $class_properties, $config, $options);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
201
|
+
|
|
202
|
+
// Animations
|
|
203
|
+
@else if ($property == '_animations') {
|
|
204
|
+
@include generate-animation($tag, $value, $config, $options);
|
|
205
|
+
} @else {
|
|
206
|
+
@include generate-css-variables($tag, $property, $value, $config, $options);
|
|
212
207
|
}
|
|
213
208
|
}
|
|
214
209
|
}
|
|
@@ -1806,7 +1806,7 @@ $components-config: (
|
|
|
1806
1806
|
)
|
|
1807
1807
|
),
|
|
1808
1808
|
|
|
1809
|
-
'
|
|
1809
|
+
'.tooltip' : (
|
|
1810
1810
|
|
|
1811
1811
|
--padding: 0.25rem 0.5rem,
|
|
1812
1812
|
|
|
@@ -1829,6 +1829,9 @@ $components-config: (
|
|
|
1829
1829
|
|
|
1830
1830
|
color: inherit,
|
|
1831
1831
|
|
|
1832
|
+
transition: string.unquote('transform 0.15s ease-in, opacity 0.15s ease-in, display 0.15s ease-in allow-discrete'),
|
|
1833
|
+
translate: -50% 0,
|
|
1834
|
+
|
|
1832
1835
|
_colors : (
|
|
1833
1836
|
light : (
|
|
1834
1837
|
background: #fff,
|
|
@@ -1840,9 +1843,6 @@ $components-config: (
|
|
|
1840
1843
|
)
|
|
1841
1844
|
),
|
|
1842
1845
|
|
|
1843
|
-
transition: string.unquote('transform 0.15s ease-in, opacity 0.15s ease-in, display 0.15s ease-in allow-discrete'),
|
|
1844
|
-
translate: -50% 0,
|
|
1845
|
-
|
|
1846
1846
|
_atrule : (
|
|
1847
1847
|
'@starting-style' : (
|
|
1848
1848
|
opacity: 0,
|
|
@@ -1957,8 +1957,6 @@ $components-config: (
|
|
|
1957
1957
|
),
|
|
1958
1958
|
)
|
|
1959
1959
|
),
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
1960
|
)
|
|
1963
1961
|
)
|
|
1964
1962
|
)
|