@nulllogic/scssleon 1.0.5 → 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 +144 -37
- package/package.json +4 -2
- package/scss/_base.scss +3 -16
- package/scss/_content.scss +5 -22
- package/scss/_mixins.scss +0 -14
- package/scss/_root.scss +6 -7
- package/scss/mixins/generators/_components.scss +4 -47
- package/scss/mixins/generators/_properties.scss +44 -50
- package/scss/scssleon.scss +0 -11
- package/scss/themes/_default.scss +4 -7
- package/scss/_utilities.scss +0 -356
- package/scss/animations/_placeholder.scss +0 -12
- package/scss/helpers/_clearfix.scss +0 -5
- package/scss/helpers/_screen_reader.scss +0 -11
- package/scss/helpers/_text_truncate.scss +0 -5
- package/scss/mixins/_border-radius.scss +0 -3
- package/scss/mixins/_box-shadow.scss +0 -16
- package/scss/mixins/_clearfix.scss +0 -9
- package/scss/mixins/_forms.scss +0 -152
- package/scss/mixins/_gradients.scss +0 -6
- package/scss/mixins/_grid.scss +0 -93
- package/scss/mixins/_transition.scss +0 -30
- package/scss/mixins/_utilities.scss +0 -15
- package/scss/mixins/generators/_color-sheme.scss +0 -5
- package/scss/utilities/_api.scss +0 -24
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>
|
|
@@ -15,17 +15,68 @@ Welcome to SCSSLEON framework ! It's the most advanced responsive front-end fram
|
|
|
15
15
|
– [ <a href="http://nulllogic.github.io/scssleon-docs" target="_self">Documentation</a> ] — [ <a href="https://github.com/nulllogic/scssleon/issues" target="_blank">Bugs/Issues</a> ] — [ <a href="https://stackoverflow.com/questions/tagged/scssleon" target="_blank">StackOverflow</a> ] –
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
<hr />
|
|
19
|
+
|
|
20
|
+
## Table of Contents
|
|
21
|
+
<details>
|
|
22
|
+
<summary>↪ ≡˚ ✧ ━━━━⊱TOC⊰━━━━ ✧ ₊˚≡</summary>
|
|
23
|
+
<br />
|
|
24
|
+
|
|
25
|
+
- [Why SCSSLEON?](#user-content---why-scssleon--)
|
|
26
|
+
- [Features](#user-content---features-)
|
|
27
|
+
- [Getting started](#user-content---getting-started-)
|
|
28
|
+
- [Usage Examples](#user-content---usage-examples-)
|
|
29
|
+
- [Showcase](#user-content---showcase-)
|
|
30
|
+
- [Documentation](#user-content---documentation-)
|
|
31
|
+
- [Contributing](#user-content--contributing-)
|
|
32
|
+
- [Thanks](#user-content--thanks-)
|
|
33
|
+
- [License](#user-content---license-)
|
|
34
|
+
<br />
|
|
35
|
+
</details>
|
|
36
|
+
|
|
37
|
+
<hr />
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### ⓘ Prerequisites
|
|
41
|
+
- Knowledge of [SCSS](https://sass-lang.com).
|
|
42
|
+
- [🐳 Docker](https://www.docker.com)
|
|
43
|
+
- [💻 Node](https://nodejs.org) + [📦 NPM](https://nodejs.org)
|
|
44
|
+
|
|
45
|
+
<hr />
|
|
46
|
+
|
|
47
|
+
## ┌ 🤔 Why SCSSLEON ? ┐
|
|
48
|
+
|
|
49
|
+
SCSSLEON is designed for developers who want a lightweight, modular, and highly customizable SCSS framework. Unlike other frameworks, SCSSLEON:
|
|
50
|
+
|
|
51
|
+
- Offers a minimal footprint for faster load times.
|
|
52
|
+
- Provides intuitive mixins and utilities for rapid development.
|
|
53
|
+
- Supports easy theming with customizable variables.
|
|
54
|
+
- Color scheme support – easily add dark and light theme support
|
|
55
|
+
- Responsive support with zero efforts
|
|
56
|
+
- Easy to learn, easy to use
|
|
57
|
+
- Zero dependencies, except SASS
|
|
58
|
+
|
|
59
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
19
60
|
|
|
20
|
-
|
|
61
|
+
<hr />
|
|
62
|
+
|
|
63
|
+
## ┌ ✨ Features ┐
|
|
21
64
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
65
|
+
- **Responsive Grid System**: Build flexible layouts with a customizable 12-column grid.
|
|
66
|
+
- **Theming Support**: Easily customize colors, fonts, and spacing with SCSS variables.
|
|
67
|
+
- **Utility Classes**: Includes helpers for spacing, typography, and visibility.
|
|
68
|
+
- **Lightweight**: Minimal CSS output for faster performance.
|
|
69
|
+
- **Modern CSS**: Built-in support for Flexbox, CSS Grid, and custom properties.
|
|
24
70
|
|
|
25
|
-
|
|
71
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
72
|
+
|
|
73
|
+
<hr />
|
|
74
|
+
|
|
75
|
+
## ┌ 🧭 Getting Started ┐
|
|
26
76
|
|
|
27
77
|
<details>
|
|
28
|
-
<summary> Method #1
|
|
78
|
+
<summary> Method #1 - NodeJS + NPM basic setup [ 🛖🔥🦴 primitive ] </summary>
|
|
79
|
+
<br />
|
|
29
80
|
|
|
30
81
|
1. Install packages – run the following command in your project directory to install SCSSLEON + SASS:
|
|
31
82
|
|
|
@@ -39,7 +90,7 @@ npm i @nulllogic/scssleon sass
|
|
|
39
90
|
npm init -y
|
|
40
91
|
```
|
|
41
92
|
|
|
42
|
-
|
|
93
|
+
3. Update `package.json` file. Add following strings
|
|
43
94
|
|
|
44
95
|
```json
|
|
45
96
|
"scripts": {
|
|
@@ -48,7 +99,29 @@ npm init -y
|
|
|
48
99
|
}
|
|
49
100
|
```
|
|
50
101
|
|
|
51
|
-
|
|
102
|
+
It will look like this :
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"@nulllogic/scssleon": "^1.0.5",
|
|
107
|
+
"sass": "^1.89.2"
|
|
108
|
+
},
|
|
109
|
+
"name": "test",
|
|
110
|
+
"version": "1.0.0",
|
|
111
|
+
"main": "index.js",
|
|
112
|
+
"devDependencies": {},
|
|
113
|
+
"scripts": {
|
|
114
|
+
"sass-dev": "sass --watch --update --style=expanded styles:assets/css --load-path=node_modules",
|
|
115
|
+
"sass-prod": "sass --no-source-map --style=compressed styles:assets/css --load-path=node_modules"
|
|
116
|
+
},
|
|
117
|
+
"keywords": [],
|
|
118
|
+
"author": "",
|
|
119
|
+
"license": "ISC",
|
|
120
|
+
"description": ""
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
4. Create `app.scss` inside your project in `/styles` directory
|
|
52
125
|
|
|
53
126
|
```scss
|
|
54
127
|
@use 'sass:map';
|
|
@@ -91,7 +164,7 @@ $config: config.$config;
|
|
|
91
164
|
$theme: theme.$theme;
|
|
92
165
|
```
|
|
93
166
|
|
|
94
|
-
|
|
167
|
+
5. Create `base.scss` inside your project in `/styles/components` directory
|
|
95
168
|
```scss
|
|
96
169
|
// Loading your SCSS module with pre-defined config and theme
|
|
97
170
|
// ↓ Config
|
|
@@ -115,62 +188,96 @@ $theme: theme.$theme;
|
|
|
115
188
|
$config: app.$config,
|
|
116
189
|
$theme: app.$theme
|
|
117
190
|
);
|
|
118
|
-
|
|
119
|
-
// ↓ Container
|
|
120
|
-
@use "@nulllogic/scssleon/scss/container" with (
|
|
121
|
-
$config: app.$config,
|
|
122
|
-
$theme: app.$theme
|
|
123
|
-
);
|
|
124
191
|
```
|
|
125
192
|
|
|
126
|
-
|
|
193
|
+
6. Run node command at root `/` of your project to generate CSS code to `/assets/css`
|
|
194
|
+
|
|
127
195
|
```bash
|
|
128
196
|
npm run sass-dev
|
|
129
197
|
```
|
|
130
198
|
|
|
131
|
-
|
|
199
|
+
7. Profit – you have output at `/assets/css` directory now 🙌
|
|
200
|
+
|
|
201
|
+
<img alt="SCSSleon framework" src="./.imgs/method_1.jpg">
|
|
132
202
|
|
|
133
203
|
</details>
|
|
134
204
|
|
|
205
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
135
206
|
|
|
136
|
-
|
|
207
|
+
<hr />
|
|
137
208
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
</p>
|
|
209
|
+
## ┌ 👓 Usage Examples ┐
|
|
210
|
+
|
|
211
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
212
|
+
|
|
213
|
+
<hr />
|
|
214
|
+
|
|
215
|
+
## ┌ 📺 Showcase ┐
|
|
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
|
+
|
|
233
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
141
234
|
|
|
142
|
-
|
|
235
|
+
<hr />
|
|
143
236
|
|
|
144
|
-
|
|
237
|
+
## ┌ 📚 Documentation ┐
|
|
145
238
|
|
|
146
|
-
|
|
239
|
+
SCSSLeon documentation is available here [http://nulllogic.github.io/scssleon-docs](http://nulllogic.github.io/scssleon-docs)
|
|
147
240
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
241
|
+
Documentation is built with [Astro](https://astro.build/) and publicly hosted on GitHub Pages [here](http://nulllogic.github.io/scssleon-docs).
|
|
242
|
+
Search is powered by [Algolia](https://community.algolia.com/docsearch/).
|
|
243
|
+
|
|
244
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
245
|
+
|
|
246
|
+
<hr />
|
|
151
247
|
|
|
152
248
|
## ┌ Contributing ┐
|
|
153
249
|
|
|
154
|
-
|
|
155
|
-
<img src="./.imgs/contributing.jpg" width="100%" alt="SCSSleon contributing">
|
|
156
|
-
</p>
|
|
250
|
+
For contributing, please view the [CONTRIBUTING](CONTRIBUTING.md).
|
|
157
251
|
|
|
158
|
-
>
|
|
252
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
253
|
+
|
|
254
|
+
<hr />
|
|
159
255
|
|
|
160
256
|
## ┌ Thanks ┐
|
|
161
257
|
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
258
|
+
<a href="https://www.browserstack.com" title="BrowserStack" target="_blank">
|
|
259
|
+
<picture>
|
|
260
|
+
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/bstack-logo-global.svg">
|
|
261
|
+
<img alt="SCSSleon framework" src="./.imgs/bstack-logo-global-dark.svg">
|
|
262
|
+
</picture>
|
|
263
|
+
</a><br />
|
|
165
264
|
|
|
166
|
-
<a href="https://www.browserstack.com"><img src="./.imgs/browserstack.jpg" alt="browserstack"></a><br />
|
|
167
265
|
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
|
168
266
|
|
|
267
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
268
|
+
|
|
269
|
+
<hr />
|
|
270
|
+
|
|
169
271
|
## ┌ 📜 License ┐
|
|
170
272
|
[MIT license](LICENSE)
|
|
171
273
|
|
|
172
274
|
<hr />
|
|
173
275
|
|
|
174
276
|
<p align="center">
|
|
175
|
-
<a href="https://nulllogic.net/" target="_blank"
|
|
277
|
+
<a href="https://nulllogic.net/" target="_blank">
|
|
278
|
+
<picture>
|
|
279
|
+
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/logo_nulllogic_dark.png">
|
|
280
|
+
<img alt="SCSSleon framework" src="./.imgs/logo_nulllogic.png">
|
|
281
|
+
</picture>
|
|
282
|
+
</a>
|
|
176
283
|
</p>
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
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.7",
|
|
5
|
+
"version_short": "1.0.7",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"css",
|
|
8
8
|
"sass",
|
|
9
|
+
"scss",
|
|
10
|
+
"scss-framework",
|
|
9
11
|
"mobile-first",
|
|
10
12
|
"responsive",
|
|
11
13
|
"front-end",
|
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
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
// ↓ Helpers
|
|
2
2
|
@forward "mixins/breakpoints";
|
|
3
|
-
@forward "mixins/clearfix";
|
|
4
|
-
|
|
5
|
-
@forward "mixins/box-shadow";
|
|
6
|
-
@forward "mixins/border-radius";
|
|
7
|
-
@forward "mixins/transition";
|
|
8
|
-
@forward "mixins/gradients";
|
|
9
3
|
|
|
10
4
|
// ↓ Generators
|
|
11
|
-
@forward "mixins/generators/color-sheme";
|
|
12
5
|
@forward "mixins/generators/components";
|
|
13
6
|
@forward "mixins/generators/properties";
|
|
14
7
|
|
|
15
|
-
// ↓ Utilities
|
|
16
|
-
@forward "mixins/utilities";
|
|
17
|
-
|
|
18
|
-
// ↓ Components
|
|
19
|
-
@forward "mixins/forms";
|
|
20
|
-
|
|
21
|
-
// ↓ Layout
|
package/scss/_root.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* - ૮₍ ˃ ⤙ ˂ ₎ა – root */
|
|
2
|
-
@use
|
|
3
|
-
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
|
|
4
|
+
@use './mixins' as mixins;
|
|
4
5
|
@use "./functions" as functions;
|
|
5
6
|
|
|
6
7
|
$config: () !default;
|
|
@@ -10,16 +11,14 @@ $prefix: functions.get-config($config, "prefix");
|
|
|
10
11
|
|
|
11
12
|
$is-smooth-scroll-enabled: functions.get-config(
|
|
12
13
|
$config,
|
|
13
|
-
|
|
14
|
+
'enable.smooth-scroll'
|
|
14
15
|
);
|
|
15
16
|
|
|
16
|
-
$root-variables: functions.get-theme($theme, "root.variables");
|
|
17
|
-
|
|
18
17
|
:root {
|
|
19
18
|
/* 🌱𖣂🫚🌿 */
|
|
20
19
|
@include mixins.generate-properties(
|
|
21
|
-
|
|
22
|
-
functions.get-theme($theme,
|
|
20
|
+
'root',
|
|
21
|
+
functions.get-theme($theme, 'root'),
|
|
23
22
|
$config,
|
|
24
23
|
);
|
|
25
24
|
|
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
@mixin generate-component($component, $class, $config, $theme, $options : ()) {
|
|
11
11
|
$theme-component: '';
|
|
12
|
-
|
|
13
12
|
$color_scheme: functions.get-config($config, 'color-scheme');
|
|
14
|
-
$is_wrapper_enabled: functions.get-config($config, 'enable.wrapper');
|
|
15
|
-
$wrapper_class: functions.get-config($config, 'wrapper');
|
|
16
13
|
|
|
17
14
|
// Checking, if the component was previously defined inside theme's components
|
|
18
15
|
@if (meta.type-of($component) == 'string') {
|
|
@@ -25,46 +22,10 @@
|
|
|
25
22
|
$theme-component: $component;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@if $scheme == 'light' {
|
|
31
|
-
@if ($is_wrapper_enabled) {
|
|
32
|
-
#{$wrapper_class} {
|
|
33
|
-
.#{$class} {
|
|
34
|
-
@include properties.generate-properties($class, $theme-component, $config, map.deep-merge((
|
|
35
|
-
scheme: $scheme,
|
|
36
|
-
), $options));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
} @else {
|
|
40
|
-
.#{$class} {
|
|
41
|
-
@include properties.generate-properties($class, $theme-component, $config, map.deep-merge((
|
|
42
|
-
scheme: $scheme,
|
|
43
|
-
), $options));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@if $scheme == 'dark' {
|
|
49
|
-
@if ($is_wrapper_enabled) {
|
|
50
|
-
#{$wrapper_class}[data-theme="#{$scheme}"] {
|
|
51
|
-
.#{$class}:where([data-theme="#{$scheme}"], [data-theme="#{$scheme}"] *) {
|
|
52
|
-
@include properties.generate-properties($class, $theme-component, $config, map.deep-merge((
|
|
53
|
-
scheme: $scheme,
|
|
54
|
-
), $options));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
} @else {
|
|
59
|
-
.#{$class}:where([data-theme="#{$scheme}"], [data-theme="#{$scheme}"] *) {
|
|
60
|
-
@include properties.generate-properties($class, $theme-component, $config, map.deep-merge((
|
|
61
|
-
scheme: $scheme,
|
|
62
|
-
), $options));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}
|
|
25
|
+
.#{$class} {
|
|
26
|
+
@include properties.generate-properties($class, $theme-component, $config, $options);
|
|
67
27
|
}
|
|
28
|
+
|
|
68
29
|
}
|
|
69
30
|
|
|
70
31
|
@mixin generate-components($components, $config, $theme) {
|
|
@@ -72,7 +33,7 @@
|
|
|
72
33
|
// Get components
|
|
73
34
|
@each $component in $components {
|
|
74
35
|
// Component options param check
|
|
75
|
-
@if(list.length($component) > 2) {
|
|
36
|
+
@if (list.length($component) > 2) {
|
|
76
37
|
@include generate-component(
|
|
77
38
|
list.nth($component, 1),
|
|
78
39
|
list.nth($component, 2),
|
|
@@ -89,8 +50,4 @@
|
|
|
89
50
|
)
|
|
90
51
|
}
|
|
91
52
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@mixin get-structure($component) {
|
|
95
|
-
@debug $component;
|
|
96
53
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@use "sass:list";
|
|
5
5
|
|
|
6
6
|
@use "../../functions" as functions;
|
|
7
|
-
@use "../../mixins/generators/color-sheme" as mixin;
|
|
8
7
|
|
|
9
8
|
@mixin generate-css-properties($tag, $property, $value, $config, $options : ()) {
|
|
10
9
|
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
$variable_options_custom_name: functions.get-config($options, 'variable.name');
|
|
57
56
|
$variable_options_exclude: functions.get-config($options, 'variable.exclude');
|
|
58
57
|
|
|
59
|
-
$variable_name
|
|
58
|
+
$variable_name: $tag;
|
|
60
59
|
|
|
61
60
|
@if ($variable_options_custom_name != nil) {
|
|
62
61
|
$variable_name: $variable_options_custom_name;
|
|
@@ -85,15 +84,22 @@
|
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
@mixin generate-colors($tag, $value, $config, $options
|
|
87
|
+
@mixin generate-colors($tag, $value, $config, $options) {
|
|
89
88
|
$prefix: functions.get-config($config, 'prefix');
|
|
90
89
|
|
|
91
90
|
@each $color, $color-properties in $value {
|
|
92
|
-
@if ($color ==
|
|
91
|
+
@if ($color == 'light') {
|
|
93
92
|
@each $color-property, $color-value in $color-properties {
|
|
94
93
|
@include generate-css-properties($tag, $color-property, $color-value, $config, $options);
|
|
95
94
|
}
|
|
96
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
|
+
}
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
|
|
@@ -133,8 +139,8 @@
|
|
|
133
139
|
@each $at-rule, $properties in $value {
|
|
134
140
|
// Keep @ at the beginning
|
|
135
141
|
@#{functions.replace($at-rule, '@', '')} {
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
@include generate-properties($tag, $properties, $config, $options);
|
|
143
|
+
}
|
|
138
144
|
}
|
|
139
145
|
}
|
|
140
146
|
|
|
@@ -161,55 +167,43 @@
|
|
|
161
167
|
$prefix: functions.get-config($config, 'prefix');
|
|
162
168
|
$is_scheme_dark: functions.get-config($options, 'scheme') != nil and functions.get-config($options, 'scheme') == 'dark';
|
|
163
169
|
|
|
164
|
-
@
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Colors
|
|
176
|
-
@else if ($property == '_colors') {
|
|
177
|
-
@include generate-colors($tag, $value, $config, $options, 'light');
|
|
178
|
-
}
|
|
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
|
+
}
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
// Colors
|
|
181
|
+
@else if ($property == '_colors') {
|
|
182
|
+
@include generate-colors($tag, $value, $config, $options);
|
|
183
|
+
}
|
|
184
184
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
}
|
|
185
|
+
// Responsive
|
|
186
|
+
@else if ($property == '_responsive') {
|
|
187
|
+
@include generate-responsive($tag, $value, $config);
|
|
188
|
+
}
|
|
191
189
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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);
|
|
195
194
|
}
|
|
195
|
+
}
|
|
196
196
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
} @else {
|
|
201
|
-
@include generate-css-variables($tag, $property, $value, $config, $options);
|
|
202
|
-
}
|
|
197
|
+
// At-rules
|
|
198
|
+
@else if ($property == '_atrule') {
|
|
199
|
+
@include generate-atrule($tag, $value, $config, $options);
|
|
203
200
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
@include generate-subclasses($tag, $class, $class_properties, $config, $options);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
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);
|
|
213
207
|
}
|
|
214
208
|
}
|
|
215
|
-
}
|
|
209
|
+
}
|
package/scss/scssleon.scss
CHANGED
|
@@ -203,15 +203,4 @@ $theme: theme.$theme;
|
|
|
203
203
|
@use 'components/tooltip' with (
|
|
204
204
|
$config: $config,
|
|
205
205
|
$theme: $theme
|
|
206
|
-
);
|
|
207
|
-
|
|
208
|
-
// ↓ Helpers
|
|
209
|
-
@use 'helpers/clearfix';
|
|
210
|
-
@use 'helpers/screen_reader';
|
|
211
|
-
@use 'helpers/text_truncate';
|
|
212
|
-
|
|
213
|
-
// ↓ Utilities
|
|
214
|
-
@use 'utilities/api' with (
|
|
215
|
-
$config: $config,
|
|
216
|
-
$theme: $theme
|
|
217
206
|
);
|
|
@@ -215,7 +215,6 @@ $content-config: (
|
|
|
215
215
|
line-height: clamp(1.25em, 4vw, 1.5em),
|
|
216
216
|
padding: 1rem,
|
|
217
217
|
font-style: italic,
|
|
218
|
-
font-size: 1.5rem,
|
|
219
218
|
|
|
220
219
|
border-left: var(--blockquote-border),
|
|
221
220
|
|
|
@@ -1807,7 +1806,7 @@ $components-config: (
|
|
|
1807
1806
|
)
|
|
1808
1807
|
),
|
|
1809
1808
|
|
|
1810
|
-
'
|
|
1809
|
+
'.tooltip' : (
|
|
1811
1810
|
|
|
1812
1811
|
--padding: 0.25rem 0.5rem,
|
|
1813
1812
|
|
|
@@ -1830,6 +1829,9 @@ $components-config: (
|
|
|
1830
1829
|
|
|
1831
1830
|
color: inherit,
|
|
1832
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
|
+
|
|
1833
1835
|
_colors : (
|
|
1834
1836
|
light : (
|
|
1835
1837
|
background: #fff,
|
|
@@ -1841,9 +1843,6 @@ $components-config: (
|
|
|
1841
1843
|
)
|
|
1842
1844
|
),
|
|
1843
1845
|
|
|
1844
|
-
transition: string.unquote('transform 0.15s ease-in, opacity 0.15s ease-in, display 0.15s ease-in allow-discrete'),
|
|
1845
|
-
translate: -50% 0,
|
|
1846
|
-
|
|
1847
1846
|
_atrule : (
|
|
1848
1847
|
'@starting-style' : (
|
|
1849
1848
|
opacity: 0,
|
|
@@ -1958,8 +1957,6 @@ $components-config: (
|
|
|
1958
1957
|
),
|
|
1959
1958
|
)
|
|
1960
1959
|
),
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
1960
|
)
|
|
1964
1961
|
)
|
|
1965
1962
|
)
|