@nulllogic/scssleon 1.0.6 → 1.0.8
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 -11
- 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 +63 -51
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulllogic/scssleon",
|
|
3
3
|
"description": "Most advanced, simple and clean SCSS framework",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"version_short": "1.0.
|
|
4
|
+
"version": "1.0.8",
|
|
5
|
+
"version_short": "1.0.8",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"css",
|
|
8
8
|
"sass",
|
|
@@ -16,17 +16,8 @@
|
|
|
16
16
|
"web",
|
|
17
17
|
"scssleon"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"css": "npm run css-compile",
|
|
21
|
-
"css-compile": "sass --style expanded --source-map --embed-sources scss/:dist/css/",
|
|
22
|
-
"dist": "npm run css && npm run minify",
|
|
23
|
-
"watch": "sass --watch ./scss:./dist/css"
|
|
24
|
-
},
|
|
25
19
|
"dependencies": {
|
|
26
20
|
"sass": "^1.89.2"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
|
|
30
21
|
},
|
|
31
22
|
"homepage": "https://nulllogic.github.io/scssleon-docs",
|
|
32
23
|
"style": "dist/scssleon.css",
|
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
|
}
|
|
@@ -49,13 +49,25 @@
|
|
|
49
49
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
@mixin generate-print-variables($tag, $value, $config, $options) {
|
|
53
|
+
@media print {
|
|
54
|
+
@include generate-properties($tag, $value, $config, $options);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@mixin generate-rtl-variables($tag, $value, $config, $options) {
|
|
59
|
+
&:where(:dir(rtl),[dir=rtl],[dir=rtl] *) {
|
|
60
|
+
@include generate-properties($tag, $value, $config, $options);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
52
64
|
@mixin generate-css-variables($tag, $property, $value, $config, $options) {
|
|
53
65
|
$prefix: functions.get-config($config, 'prefix');
|
|
54
66
|
|
|
55
67
|
$variable_options_custom_name: functions.get-config($options, 'variable.name');
|
|
56
68
|
$variable_options_exclude: functions.get-config($options, 'variable.exclude');
|
|
57
69
|
|
|
58
|
-
$variable_name
|
|
70
|
+
$variable_name: $tag;
|
|
59
71
|
|
|
60
72
|
@if ($variable_options_custom_name != nil) {
|
|
61
73
|
$variable_name: $variable_options_custom_name;
|
|
@@ -84,15 +96,22 @@
|
|
|
84
96
|
}
|
|
85
97
|
}
|
|
86
98
|
|
|
87
|
-
@mixin generate-colors($tag, $value, $config, $options
|
|
99
|
+
@mixin generate-colors($tag, $value, $config, $options) {
|
|
88
100
|
$prefix: functions.get-config($config, 'prefix');
|
|
89
101
|
|
|
90
102
|
@each $color, $color-properties in $value {
|
|
91
|
-
@if ($color ==
|
|
103
|
+
@if ($color == 'light') {
|
|
92
104
|
@each $color-property, $color-value in $color-properties {
|
|
93
105
|
@include generate-css-properties($tag, $color-property, $color-value, $config, $options);
|
|
94
106
|
}
|
|
95
107
|
}
|
|
108
|
+
@if ($color == 'dark') {
|
|
109
|
+
&:where([data-theme="#{$color}"], [data-theme="#{$color}"] *) {
|
|
110
|
+
@each $color-property, $color-value in $color-properties {
|
|
111
|
+
@include generate-css-properties($tag, $color-property, $color-value, $config, $options);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
96
115
|
}
|
|
97
116
|
}
|
|
98
117
|
|
|
@@ -137,10 +156,6 @@
|
|
|
137
156
|
}
|
|
138
157
|
}
|
|
139
158
|
|
|
140
|
-
@mixin generate-print($tag, $value, $config, $options) {
|
|
141
|
-
//@TODO
|
|
142
|
-
}
|
|
143
|
-
|
|
144
159
|
@mixin generate-animation($tag, $value, $config, $options) {
|
|
145
160
|
@each $name, $properties in $value {
|
|
146
161
|
// Check, if _animation is not empty ;;
|
|
@@ -158,57 +173,54 @@
|
|
|
158
173
|
|
|
159
174
|
@mixin generate-properties($tag, $properties, $config, $options : ()) {
|
|
160
175
|
$prefix: functions.get-config($config, 'prefix');
|
|
161
|
-
$is_scheme_dark: functions.get-config($options, 'scheme') != nil and functions.get-config($options, 'scheme') == 'dark';
|
|
162
|
-
|
|
163
|
-
@if (not $is_scheme_dark) {
|
|
164
|
-
@each $property, $value in $properties {
|
|
165
|
-
// Variables
|
|
166
|
-
// Looking for "--" symbols in the beginning of the property
|
|
167
|
-
// Example: --flex-direction : row
|
|
168
|
-
@if (
|
|
169
|
-
meta.type-of($property) == 'string' and string.index($property, "--") == 1
|
|
170
|
-
) {
|
|
171
|
-
@include generate-css-properties($tag, $property, $value, $config, $options);
|
|
172
|
-
}
|
|
173
176
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
@each $property, $value in $properties {
|
|
178
|
+
// Variables
|
|
179
|
+
// Looking for "--" symbols in the beginning of the property
|
|
180
|
+
// Example: --flex-direction : row
|
|
181
|
+
@if (
|
|
182
|
+
meta.type-of($property) == 'string' and string.index($property, "--") == 1
|
|
183
|
+
) {
|
|
184
|
+
@include generate-css-properties($tag, $property, $value, $config, $options);
|
|
185
|
+
}
|
|
178
186
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
187
|
+
// Colors
|
|
188
|
+
@else if ($property == '_colors') {
|
|
189
|
+
@include generate-colors($tag, $value, $config, $options);
|
|
190
|
+
}
|
|
183
191
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
}
|
|
192
|
+
// Responsive
|
|
193
|
+
@else if ($property == '_responsive') {
|
|
194
|
+
@include generate-responsive($tag, $value, $config);
|
|
195
|
+
}
|
|
190
196
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
// Subclasses
|
|
198
|
+
@else if ($property == '_subclasses') {
|
|
199
|
+
@each $class, $class_properties in $value {
|
|
200
|
+
@include generate-subclasses($tag, $class, $class_properties, $config, $options);
|
|
194
201
|
}
|
|
202
|
+
}
|
|
195
203
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
} @else {
|
|
200
|
-
@include generate-css-variables($tag, $property, $value, $config, $options);
|
|
201
|
-
}
|
|
204
|
+
// At-rules
|
|
205
|
+
@else if ($property == '_atrule') {
|
|
206
|
+
@include generate-atrule($tag, $value, $config, $options);
|
|
202
207
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
|
|
209
|
+
// Print media query
|
|
210
|
+
@else if ($property == '_print') {
|
|
211
|
+
@include generate-print-variables($tag, $value, $config, $options);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// RTL support
|
|
215
|
+
@else if ($property == '_rtl') {
|
|
216
|
+
@include generate-rtl-variables($tag, $value, $config, $options);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Animations
|
|
220
|
+
@else if ($property == '_animations') {
|
|
221
|
+
@include generate-animation($tag, $value, $config, $options);
|
|
222
|
+
} @else {
|
|
223
|
+
@include generate-css-variables($tag, $property, $value, $config, $options);
|
|
212
224
|
}
|
|
213
225
|
}
|
|
214
226
|
}
|
|
@@ -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
|
)
|