@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="left">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="./.imgs/header.jpg">
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>↪ ≡─〰─〰─ Show TOC ─〰─〰─≡</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.6",
5
- "version_short": "1.0.6",
4
+ "version": "1.0.7",
5
+ "version_short": "1.0.7",
6
6
  "keywords": [
7
7
  "css",
8
8
  "sass",
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
- @if $scheme == 'light' {
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
  }
@@ -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
- @if $scheme == 'light' {
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
- // Only apply styling to elements, that stand right after `.content` class
25
- & > #{$tag} {
26
- @include mixins.generate-properties(#{$tag}, $properties, $config, (
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
@@ -3,4 +3,5 @@
3
3
 
4
4
  // ↓ Generators
5
5
  @forward "mixins/generators/components";
6
- @forward "mixins/generators/properties";
6
+ @forward "mixins/generators/properties";
7
+
@@ -22,23 +22,8 @@
22
22
  $theme-component: $component;
23
23
  }
24
24
 
25
- @each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
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 : $tag;
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, $requested_color : 'light') {
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 == $requested_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
- @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
-
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
- // Responsive
180
- @else if ($property == '_responsive') {
181
- @include generate-responsive($tag, $value, $config);
182
- }
180
+ // Colors
181
+ @else if ($property == '_colors') {
182
+ @include generate-colors($tag, $value, $config, $options);
183
+ }
183
184
 
184
- // Sub classes
185
- @else if ($property == "_subclasses") {
186
- @each $class, $class_properties in $value {
187
- @include generate-subclasses($tag, $class, $class_properties, $config, $options);
188
- }
189
- }
185
+ // Responsive
186
+ @else if ($property == '_responsive') {
187
+ @include generate-responsive($tag, $value, $config);
188
+ }
190
189
 
191
- // At-rules
192
- @else if ($property == '_atrule') {
193
- @include generate-atrule($tag, $value, $config, $options);
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
- // Animations
197
- @else if ($property == '_animations') {
198
- @include generate-animation($tag, $value, $config, $options);
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
- } @else {
204
- @each $property, $value in $properties {
205
- @if ($property == '_colors') {
206
- @include generate-colors($tag, $value, $config, $options, 'dark');
207
- } @else if ($property == '_subclasses') {
208
- @each $class, $class_properties in $value {
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
- '& .tooltip' : (
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
  )