@nulllogic/scssleon 1.0.4 → 1.0.6
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 +230 -39
- package/package.json +4 -2
- package/scss/_base.scss +35 -2
- package/scss/_config.scss +10 -30
- package/scss/_content.scss +30 -7
- package/scss/_mixins.scss +1 -17
- package/scss/_reset.scss +23 -6
- package/scss/_root.scss +7 -11
- package/scss/components/_container.scss +19 -17
- package/scss/components/_form.scss +3 -44
- package/scss/components/_megamenu.scss +15 -0
- package/scss/components/_placeholder.scss +1 -15
- package/scss/components/_tooltip.scss +15 -0
- package/scss/mixins/generators/_components.scss +42 -12
- package/scss/mixins/generators/_properties.scss +146 -62
- package/scss/scssleon.scss +33 -36
- package/scss/themes/_default.scss +1192 -328
- 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 -17
- package/scss/mixins/generators/_wrapper.scss +0 -16
- package/scss/utilities/_api.scss +0 -24
package/README.md
CHANGED
|
@@ -1,76 +1,267 @@
|
|
|
1
1
|
<p align="left">
|
|
2
2
|
<picture>
|
|
3
3
|
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/header.jpg">
|
|
4
|
-
<img alt="
|
|
4
|
+
<img alt="SCSSleon framework" src="./.imgs/header.jpg">
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
# SCSSLEON [](https://github.com/Tencent/QMUI_Web/ "Version Number")
|
|
9
|
+
|
|
10
|
+
Welcome to SCSSLEON framework ! It's the most advanced responsive front-end framework, that can boost development of your website or project. It was built in love and with love from internet technologies. Peace !
|
|
8
11
|
|
|
9
12
|
<hr />
|
|
10
13
|
|
|
11
14
|
<p align="center">
|
|
12
|
-
– [ <a href="
|
|
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> ] –
|
|
13
16
|
</p>
|
|
14
17
|
|
|
15
|
-
<
|
|
16
|
-
<a href="https://nulllogic.net/"><img src="./.imgs/logo.png" alt="NullLogic logo"></a>
|
|
17
|
-
</p>
|
|
18
|
+
<hr />
|
|
18
19
|
|
|
19
|
-
##
|
|
20
|
+
## Table of Contents
|
|
21
|
+
<details>
|
|
22
|
+
<summary>↪ ≡─〰─〰─ Show TOC ─〰─〰─≡</summary>
|
|
23
|
+
<br />
|
|
20
24
|
|
|
21
|
-
[
|
|
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>
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
<hr />
|
|
24
38
|
|
|
25
|
-
<p align="left">
|
|
26
|
-
<img src="./.imgs/documentation.jpg" width="100%" alt="xiigrid documentation">
|
|
27
|
-
</p>
|
|
28
39
|
|
|
29
|
-
|
|
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>
|
|
60
|
+
|
|
61
|
+
<hr />
|
|
62
|
+
|
|
63
|
+
## ┌ ✨ Features ┐
|
|
64
|
+
|
|
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.
|
|
70
|
+
|
|
71
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
72
|
+
|
|
73
|
+
<hr />
|
|
74
|
+
|
|
75
|
+
## ┌ 🧭 Getting Started ┐
|
|
76
|
+
|
|
77
|
+
<details>
|
|
78
|
+
<summary> Method #1 - NodeJS + NPM basic setup [ 🛖🔥🦴 primitive ] </summary>
|
|
79
|
+
<br />
|
|
30
80
|
|
|
31
|
-
|
|
81
|
+
1. Install packages – run the following command in your project directory to install SCSSLEON + SASS:
|
|
32
82
|
|
|
33
|
-
|
|
83
|
+
```bash
|
|
84
|
+
npm i @nulllogic/scssleon sass
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
2. Initialize your project (if not already done). If your project doesn't have a package.json file, create one by running:
|
|
34
88
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
89
|
+
```bash
|
|
90
|
+
npm init -y
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
3. Update `package.json` file. Add following strings
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
"scripts": {
|
|
97
|
+
"sass-dev": "sass --watch --update --style=expanded styles:assets/css --load-path=node_modules",
|
|
98
|
+
"sass-prod": "sass --no-source-map --style=compressed styles:assets/css --load-path=node_modules"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
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
|
+
```
|
|
38
123
|
|
|
124
|
+
4. Create `app.scss` inside your project in `/styles` directory
|
|
39
125
|
|
|
126
|
+
```scss
|
|
127
|
+
@use 'sass:map';
|
|
128
|
+
@use "sass:string";
|
|
40
129
|
|
|
41
|
-
|
|
130
|
+
@forward "@nulllogic/scssleon/scss/mixins";
|
|
131
|
+
@forward "@nulllogic/scssleon/scss/functions";
|
|
42
132
|
|
|
133
|
+
@use "@nulllogic/scssleon/scss/config.scss" as config with (
|
|
134
|
+
// This is main config, that you can tweak
|
|
135
|
+
$config: (
|
|
136
|
+
prefix: "xii",
|
|
137
|
+
enable: (
|
|
138
|
+
wrapper: false,
|
|
139
|
+
),
|
|
140
|
+
)
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
@use "@nulllogic/scssleon/themes/default.scss" as theme with (
|
|
144
|
+
$config : config.$config,
|
|
145
|
+
$theme: (
|
|
146
|
+
html : (
|
|
147
|
+
body : (
|
|
148
|
+
_colors: (
|
|
149
|
+
light : (
|
|
150
|
+
background : rgb(244, 244, 244),
|
|
151
|
+
color: rgb(28, 29, 31),
|
|
152
|
+
),
|
|
153
|
+
dark : (
|
|
154
|
+
background : rgb(5, 17, 4),
|
|
155
|
+
color: '#ccc'
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
)
|
|
159
|
+
)
|
|
160
|
+
)
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
$config: config.$config;
|
|
164
|
+
$theme: theme.$theme;
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
5. Create `base.scss` inside your project in `/styles/components` directory
|
|
168
|
+
```scss
|
|
169
|
+
// Loading your SCSS module with pre-defined config and theme
|
|
170
|
+
// ↓ Config
|
|
171
|
+
@use "../app.scss" as app;
|
|
172
|
+
|
|
173
|
+
// Loading modules and components
|
|
174
|
+
// ↓ Root
|
|
175
|
+
@use "@nulllogic/scssleon/scss/root" with (
|
|
176
|
+
$config: app.$config,
|
|
177
|
+
$theme: app.$theme
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
// Great reset
|
|
181
|
+
@use "@nulllogic/scssleon/scss/reset" with (
|
|
182
|
+
$config: app.$config,
|
|
183
|
+
$theme: app.$theme
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
// Base
|
|
187
|
+
@use "@nulllogic/scssleon/scss/base" with (
|
|
188
|
+
$config: app.$config,
|
|
189
|
+
$theme: app.$theme
|
|
190
|
+
);
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
6. Run node command at root `/` of your project to generate CSS code to `/assets/css`
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
npm run sass-dev
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
7. Profit – you have output at `/assets/css` directory now 🙌
|
|
200
|
+
|
|
201
|
+
<img alt="SCSSleon framework" src="./.imgs/method_1.jpg">
|
|
202
|
+
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
206
|
+
|
|
207
|
+
<hr />
|
|
208
|
+
|
|
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
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
218
|
+
|
|
219
|
+
<hr />
|
|
220
|
+
|
|
221
|
+
## ┌ 📚 Documentation ┐
|
|
222
|
+
|
|
223
|
+
SCSSLeon documentation is available here [http://nulllogic.github.io/scssleon-docs](http://nulllogic.github.io/scssleon-docs)
|
|
224
|
+
|
|
225
|
+
Documentation is built with [Astro](https://astro.build/) and publicly hosted on GitHub Pages [here](http://nulllogic.github.io/scssleon-docs).
|
|
226
|
+
Search is powered by [Algolia](https://community.algolia.com/docsearch/).
|
|
227
|
+
|
|
228
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
229
|
+
|
|
230
|
+
<hr />
|
|
43
231
|
|
|
44
232
|
## ┌ Contributing ┐
|
|
45
233
|
|
|
46
|
-
|
|
47
|
-
<img src="./.imgs/contributing.jpg" width="100%" alt="xiigrid contributing">
|
|
48
|
-
</p>
|
|
234
|
+
For contributing, please view the [CONTRIBUTING](CONTRIBUTING.md).
|
|
49
235
|
|
|
50
|
-
>
|
|
236
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
237
|
+
|
|
238
|
+
<hr />
|
|
51
239
|
|
|
52
240
|
## ┌ Thanks ┐
|
|
53
241
|
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
242
|
+
<a href="https://www.browserstack.com" title="BrowserStack" target="_blank">
|
|
243
|
+
<picture>
|
|
244
|
+
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/bstack-logo-global.svg">
|
|
245
|
+
<img alt="SCSSleon framework" src="./.imgs/bstack-logo-global-dark.svg">
|
|
246
|
+
</picture>
|
|
247
|
+
</a><br />
|
|
57
248
|
|
|
58
|
-
<a href="https://www.browserstack.com"><img src="./.imgs/browserstack.jpg" alt="browserstack"></a><br />
|
|
59
249
|
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
|
60
250
|
|
|
61
|
-
|
|
251
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
62
252
|
|
|
63
|
-
<
|
|
64
|
-
<img src="./.imgs/license.jpg" width="100%" alt="xiigrid licence">
|
|
65
|
-
</p>
|
|
253
|
+
<hr />
|
|
66
254
|
|
|
255
|
+
## ┌ 📜 License ┐
|
|
67
256
|
[MIT license](LICENSE)
|
|
68
257
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
258
|
+
<hr />
|
|
259
|
+
|
|
260
|
+
<p align="center">
|
|
261
|
+
<a href="https://nulllogic.net/" target="_blank">
|
|
262
|
+
<picture>
|
|
263
|
+
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/logo_nulllogic_dark.png">
|
|
264
|
+
<img alt="SCSSleon framework" src="./.imgs/logo_nulllogic.png">
|
|
265
|
+
</picture>
|
|
266
|
+
</a>
|
|
267
|
+
</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.6",
|
|
5
|
+
"version_short": "1.0.6",
|
|
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
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
└─┘┴ ┴└─┘└─┘
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
@use "sass:string";
|
|
8
|
+
@use "sass:map";
|
|
9
|
+
|
|
7
10
|
/* Load settings and functions */
|
|
8
11
|
@use 'mixins' as mixins;
|
|
9
12
|
@use 'functions' as functions;
|
|
@@ -12,8 +15,38 @@
|
|
|
12
15
|
$config: nil !default;
|
|
13
16
|
$theme: nil !default;
|
|
14
17
|
|
|
18
|
+
$color_scheme: functions.get-config($config, 'color-scheme');
|
|
19
|
+
|
|
20
|
+
html {
|
|
21
|
+
color-scheme: string.unquote($color_scheme);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// data-theme attribute is changing the color scheme
|
|
25
|
+
html[data-theme="dark"] {
|
|
26
|
+
color-scheme: dark
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html[data-theme="light"] {
|
|
30
|
+
color-scheme: light
|
|
31
|
+
}
|
|
32
|
+
|
|
15
33
|
@each $tag, $properties in functions.get-theme($theme, 'html') {
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
}
|
|
50
|
+
}
|
|
18
51
|
}
|
|
19
52
|
}
|
package/scss/_config.scss
CHANGED
|
@@ -14,44 +14,25 @@
|
|
|
14
14
|
$config: () !default;
|
|
15
15
|
|
|
16
16
|
$default-config: (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
wrapper-class: "wrapper" // scss-docs-end root-variables
|
|
17
|
+
prefix: 'xii',
|
|
18
|
+
wrapper: '.wrapper'
|
|
20
19
|
);
|
|
21
20
|
|
|
22
21
|
// Container breakpoints
|
|
23
|
-
// scss-docs-start container-max-widths
|
|
24
22
|
$breakpoints-config: (
|
|
25
23
|
breakpoints: (
|
|
26
|
-
sm: 540px,
|
|
27
|
-
md: 720px,
|
|
28
|
-
lg: 960px,
|
|
29
|
-
xl: 1140px,
|
|
30
|
-
xxl: 1320px,
|
|
31
|
-
),
|
|
32
|
-
) !default;
|
|
33
|
-
// scss-docs-end container-max-widths
|
|
34
|
-
|
|
35
|
-
$default-config: map.deep-merge($default-config, $breakpoints-config);
|
|
36
|
-
|
|
37
|
-
// Grid breakpoints
|
|
38
|
-
// scss-docs-start grid-breakpoints
|
|
39
|
-
$grid-breakpoints-config: (
|
|
40
|
-
grid-breakpoints: (
|
|
41
|
-
xs: 0,
|
|
42
24
|
sm: 576px,
|
|
43
25
|
md: 768px,
|
|
44
26
|
lg: 992px,
|
|
45
|
-
xl:
|
|
46
|
-
xxl:
|
|
27
|
+
xl: 1220px,
|
|
28
|
+
xxl: 1380px,
|
|
47
29
|
),
|
|
48
|
-
);
|
|
49
|
-
// scss-docs-end grid-breakpoints
|
|
30
|
+
) !default;
|
|
50
31
|
|
|
51
|
-
$default-config: map.deep-merge($default-config, $
|
|
32
|
+
$default-config: map.deep-merge($default-config, $breakpoints-config);
|
|
52
33
|
|
|
53
34
|
$color_scheme-config: (
|
|
54
|
-
color-scheme:
|
|
35
|
+
color-scheme: 'light dark',
|
|
55
36
|
);
|
|
56
37
|
|
|
57
38
|
$default-config: map.deep-merge($default-config, $color_scheme-config);
|
|
@@ -69,7 +50,7 @@ $enable-rules-config: (
|
|
|
69
50
|
rtl: false,
|
|
70
51
|
button-pointers: true,
|
|
71
52
|
content-class: true,
|
|
72
|
-
wrapper:
|
|
53
|
+
wrapper: false,
|
|
73
54
|
),
|
|
74
55
|
);
|
|
75
56
|
|
|
@@ -87,17 +68,16 @@ $content-default-config: (
|
|
|
87
68
|
$default-config: map.deep-merge($default-config, $content-default-config);
|
|
88
69
|
|
|
89
70
|
// Z-index
|
|
90
|
-
// scss-docs-start z-index-stack
|
|
91
71
|
$z-index-config: (
|
|
92
72
|
z-index: (
|
|
73
|
+
tooltip: 3,
|
|
93
74
|
dropdown: 4,
|
|
94
75
|
header: 5,
|
|
95
76
|
overlay: 6,
|
|
96
77
|
modal : 7,
|
|
97
78
|
),
|
|
98
79
|
) !default;
|
|
99
|
-
// scss-docs-end z-index-stack
|
|
100
80
|
|
|
101
81
|
$default-config: map.deep-merge($default-config, $z-index-config);
|
|
102
82
|
|
|
103
|
-
$config: map.deep-merge($default-config, $config);
|
|
83
|
+
$config: map.deep-merge($default-config, $config);
|
package/scss/_content.scss
CHANGED
|
@@ -3,22 +3,45 @@
|
|
|
3
3
|
│ │ ││││ │ ├┤ │││ │
|
|
4
4
|
└─┘└─┘┘└┘ ┴ └─┘┘└┘ ┴
|
|
5
5
|
*/
|
|
6
|
-
@use
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use 'sass:string';
|
|
7
8
|
@use "functions" as functions;
|
|
8
9
|
@use "./mixins" as mixins;
|
|
9
10
|
|
|
10
11
|
$config: nil !default;
|
|
11
12
|
$theme: nil !default;
|
|
12
13
|
|
|
13
|
-
$is-content-enabled: functions.get-config($config,
|
|
14
|
+
$is-content-enabled: functions.get-config($config, 'enable.content');
|
|
15
|
+
$color_scheme: functions.get-config($config, 'color-scheme');
|
|
14
16
|
|
|
15
17
|
@if ($is-content-enabled) {
|
|
16
|
-
.
|
|
17
|
-
@each $tag, $properties in functions.get-theme($theme, "content") {
|
|
18
|
+
@each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@
|
|
20
|
+
@if $scheme == 'light' {
|
|
21
|
+
.content {
|
|
22
|
+
@each $tag, $properties in functions.get-theme($theme, 'content') {
|
|
23
|
+
|
|
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
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
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
|
+
}
|
|
22
45
|
}
|
|
23
46
|
}
|
|
24
47
|
}
|
package/scss/_mixins.scss
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
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
|
-
@forward "mixins/generators/properties";
|
|
14
|
-
@forward "mixins/generators/wrapper";
|
|
15
|
-
|
|
16
|
-
// ↓ Utilities
|
|
17
|
-
@forward "mixins/utilities";
|
|
18
|
-
|
|
19
|
-
// ↓ Components
|
|
20
|
-
@forward "mixins/forms";
|
|
21
|
-
|
|
22
|
-
// ↓ Layout
|
|
6
|
+
@forward "mixins/generators/properties";
|
package/scss/_reset.scss
CHANGED
|
@@ -6,22 +6,23 @@
|
|
|
6
6
|
|
|
7
7
|
@use "sass:map";
|
|
8
8
|
@use "sass:meta";
|
|
9
|
+
|
|
9
10
|
@use "functions" as functions;
|
|
10
11
|
@use "mixins" as mixins;
|
|
11
12
|
|
|
12
13
|
$config: nil !default;
|
|
13
14
|
$theme: nil !default;
|
|
14
15
|
|
|
15
|
-
$prefix: functions.get-config($config,
|
|
16
|
+
$prefix: functions.get-config($config, 'prefix');
|
|
16
17
|
|
|
17
|
-
$is-reset-enabled: functions.get-config($config,
|
|
18
|
+
$is-reset-enabled: functions.get-config($config, 'enable.reset');
|
|
18
19
|
$is-button-pointers-enabled: functions.get-config(
|
|
19
20
|
$config,
|
|
20
21
|
"enable.button-pointers"
|
|
21
22
|
);
|
|
22
|
-
$is-spacing-enabled: functions.get-config($config,
|
|
23
|
+
$is-spacing-enabled: functions.get-config($config, 'enable.spacing');
|
|
23
24
|
|
|
24
|
-
$color_scheme: functions.get-config($config,
|
|
25
|
+
$color_scheme: functions.get-config($config, 'color-scheme');
|
|
25
26
|
|
|
26
27
|
@if $is-reset-enabled {
|
|
27
28
|
*,
|
|
@@ -48,13 +49,13 @@ $color_scheme: functions.get-config($config, "color-scheme");
|
|
|
48
49
|
h5,
|
|
49
50
|
h6 {
|
|
50
51
|
margin: 0;
|
|
51
|
-
line-height:
|
|
52
|
+
line-height: 1;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
// Paragraph
|
|
55
56
|
p {
|
|
56
57
|
margin: 0;
|
|
57
|
-
line-height:
|
|
58
|
+
line-height: 1;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
// Lists
|
|
@@ -353,6 +354,22 @@ $color_scheme: functions.get-config($config, "color-scheme");
|
|
|
353
354
|
vertical-align: baseline;
|
|
354
355
|
}
|
|
355
356
|
|
|
357
|
+
// Definition list
|
|
358
|
+
dl {
|
|
359
|
+
dd {
|
|
360
|
+
margin: 0;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
dt {
|
|
364
|
+
margin: 0;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Blockquote
|
|
369
|
+
blockquote {
|
|
370
|
+
margin: 0;
|
|
371
|
+
}
|
|
372
|
+
|
|
356
373
|
// Hidden attribute
|
|
357
374
|
[hidden] {
|
|
358
375
|
display: none !important;
|
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,19 +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
|
-
$color_scheme: functions.get-config($config, "color-scheme");
|
|
17
|
-
|
|
18
|
-
$root-variables: functions.get-theme($theme, "root.variables");
|
|
19
|
-
|
|
20
17
|
:root {
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
/* 🌱𖣂🫚🌿 */
|
|
23
19
|
@include mixins.generate-properties(
|
|
24
|
-
|
|
25
|
-
functions.get-theme($theme,
|
|
20
|
+
'root',
|
|
21
|
+
functions.get-theme($theme, 'root'),
|
|
26
22
|
$config,
|
|
27
23
|
);
|
|
28
24
|
|