@nulllogic/scssleon 1.0.38 → 1.1.0
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 +247 -40
- package/package.json +6 -13
- package/scss/_base.scss +22 -3
- package/scss/_config.scss +11 -37
- package/scss/_content.scss +14 -6
- package/scss/_functions.scss +4 -4
- package/scss/_mixins.scss +0 -15
- package/scss/_reset.scss +26 -6
- package/scss/_root.scss +8 -12
- package/scss/components/_container.scss +19 -17
- package/scss/components/_dropdown.scss +7 -1
- package/scss/components/_form.scss +3 -44
- package/scss/components/_megamenu.scss +15 -0
- package/scss/components/_placeholder.scss +1 -20
- package/scss/components/_tooltip.scss +15 -0
- package/scss/forms/_checkbox.scss +1 -1
- package/scss/mixins/generators/_components.scss +31 -16
- package/scss/mixins/generators/_properties.scss +164 -44
- package/scss/scssleon.scss +36 -37
- package/scss/themes/_default.scss +1368 -303
- 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,283 @@
|
|
|
1
1
|
<p align="left">
|
|
2
2
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/
|
|
4
|
-
<img alt="
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="./.imgs/header_dark.jpg">
|
|
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>↪ ≡˚ ✧ ━━━━⊱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 />
|
|
80
|
+
|
|
81
|
+
1. Install packages – run the following command in your project directory to install SCSSLEON + SASS:
|
|
82
|
+
|
|
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:
|
|
88
|
+
|
|
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
|
+
```
|
|
123
|
+
|
|
124
|
+
4. Create `app.scss` inside your project in `/styles` directory
|
|
125
|
+
|
|
126
|
+
```scss
|
|
127
|
+
@use 'sass:map';
|
|
128
|
+
@use "sass:string";
|
|
129
|
+
|
|
130
|
+
@forward "@nulllogic/scssleon/scss/mixins";
|
|
131
|
+
@forward "@nulllogic/scssleon/scss/functions";
|
|
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>
|
|
30
204
|
|
|
31
|
-
|
|
205
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
32
206
|
|
|
33
|
-
|
|
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
|
+
<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>
|
|
234
|
+
|
|
235
|
+
<hr />
|
|
34
236
|
|
|
35
|
-
|
|
36
|
-
2. Open `http://localhost:8000/xiigrid/` in your browser.
|
|
37
|
-
3. Enjoy the documentation locally
|
|
237
|
+
## ┌ 📚 Documentation ┐
|
|
38
238
|
|
|
239
|
+
SCSSLeon documentation is available here [http://nulllogic.github.io/scssleon-docs](http://nulllogic.github.io/scssleon-docs)
|
|
39
240
|
|
|
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/).
|
|
40
243
|
|
|
41
|
-
|
|
244
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
42
245
|
|
|
246
|
+
<hr />
|
|
43
247
|
|
|
44
248
|
## ┌ Contributing ┐
|
|
45
249
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</p>
|
|
250
|
+
For contributing, please view the [CONTRIBUTING](CONTRIBUTING.md).
|
|
251
|
+
|
|
252
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
49
253
|
|
|
50
|
-
|
|
254
|
+
<hr />
|
|
51
255
|
|
|
52
256
|
## ┌ Thanks ┐
|
|
53
257
|
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
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 />
|
|
57
264
|
|
|
58
|
-
<a href="https://www.browserstack.com"><img src="./.imgs/browserstack.jpg" alt="browserstack"></a><br />
|
|
59
265
|
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
|
60
266
|
|
|
61
|
-
|
|
267
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
62
268
|
|
|
63
|
-
<
|
|
64
|
-
<img src="./.imgs/license.jpg" width="100%" alt="xiigrid licence">
|
|
65
|
-
</p>
|
|
269
|
+
<hr />
|
|
66
270
|
|
|
271
|
+
## ┌ 📜 License ┐
|
|
67
272
|
[MIT license](LICENSE)
|
|
68
273
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
274
|
+
<hr />
|
|
275
|
+
|
|
276
|
+
<p align="center">
|
|
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>
|
|
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.1.0",
|
|
5
|
+
"version_short": "1.1.0",
|
|
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",
|
|
@@ -14,17 +16,8 @@
|
|
|
14
16
|
"web",
|
|
15
17
|
"scssleon"
|
|
16
18
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"css": "npm run css-compile",
|
|
19
|
-
"css-compile": "sass --style expanded --source-map --embed-sources scss/:dist/css/",
|
|
20
|
-
"dist": "npm run css && npm run minify",
|
|
21
|
-
"watch": "sass --watch ./scss:./dist/css"
|
|
22
|
-
},
|
|
23
19
|
"dependencies": {
|
|
24
|
-
"sass": "^1.
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
|
|
20
|
+
"sass": "^1.90.0"
|
|
28
21
|
},
|
|
29
22
|
"homepage": "https://nulllogic.github.io/scssleon-docs",
|
|
30
23
|
"style": "dist/scssleon.css",
|
|
@@ -41,4 +34,4 @@
|
|
|
41
34
|
"publishConfig": {
|
|
42
35
|
"registry": "https://registry.npmjs.org"
|
|
43
36
|
}
|
|
44
|
-
}
|
|
37
|
+
}
|
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,9 +15,25 @@
|
|
|
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
|
-
|
|
18
|
-
|
|
34
|
+
@each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
|
|
35
|
+
#{$tag} {
|
|
36
|
+
@include mixins.generate-properties(#{$tag}, $properties, $config);
|
|
37
|
+
}
|
|
19
38
|
}
|
|
20
39
|
}
|
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
27
|
xl: 1200px,
|
|
46
28
|
xxl: 1400px,
|
|
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,22 +68,15 @@ $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: (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
modal-backdrop: 1050,
|
|
99
|
-
modal: 1055,
|
|
100
|
-
popover: 1070,
|
|
101
|
-
tooltip: 1080,
|
|
102
|
-
toast: 1090,
|
|
73
|
+
tooltip: 3,
|
|
74
|
+
dropdown: 4,
|
|
75
|
+
header: 5,
|
|
76
|
+
overlay: 6,
|
|
77
|
+
modal : 7,
|
|
103
78
|
),
|
|
104
79
|
) !default;
|
|
105
|
-
// scss-docs-end z-index-stack
|
|
106
80
|
|
|
107
81
|
$default-config: map.deep-merge($default-config, $z-index-config);
|
|
108
82
|
|
package/scss/_content.scss
CHANGED
|
@@ -3,21 +3,29 @@
|
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
@each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
|
|
19
|
+
|
|
20
|
+
.content {
|
|
21
|
+
@each $tag, $properties in functions.get-theme($theme, 'content') {
|
|
22
|
+
|
|
23
|
+
// Only apply styling to elements, that stand right after `.content` class
|
|
24
|
+
& > #{$tag} {
|
|
25
|
+
@include mixins.generate-properties(#{$tag}, $properties, $config);
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
}
|
|
29
|
+
|
|
22
30
|
}
|
|
23
31
|
}
|
package/scss/_functions.scss
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
@use 'sass:string';
|
|
4
4
|
|
|
5
5
|
@function replace($string, $search, $replace: '') {
|
|
6
|
-
$index:
|
|
6
|
+
$index: string.index($string, $search);
|
|
7
7
|
|
|
8
8
|
@if $index {
|
|
9
|
-
@return
|
|
9
|
+
@return string.slice($string, 1, $index - 1) + $replace + replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@return $string;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
@return nil;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@if (
|
|
23
|
+
@if (string.index($value, '.')) {
|
|
24
24
|
$path: string.split($value, '.');
|
|
25
25
|
$val: map.get($config, $path...);
|
|
26
26
|
} @else {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@return nil;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
@if (
|
|
45
|
+
@if (string.index($value, '.')) {
|
|
46
46
|
$path: string.split($value, '.');
|
|
47
47
|
$val: map.get($theme, $path...);
|
|
48
48
|
} @else {
|
package/scss/_mixins.scss
CHANGED
|
@@ -1,22 +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
|
-
@forward "mixins/generators/wrapper";
|
|
15
|
-
|
|
16
|
-
// ↓ Utilities
|
|
17
|
-
@forward "mixins/utilities";
|
|
18
|
-
|
|
19
|
-
// ↓ Components
|
|
20
|
-
@forward "mixins/forms";
|
|
21
7
|
|
|
22
|
-
// ↓ Layout
|
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
|
|
@@ -138,7 +139,10 @@ $color_scheme: functions.get-config($config, "color-scheme");
|
|
|
138
139
|
|
|
139
140
|
// Images and content
|
|
140
141
|
img,
|
|
142
|
+
iframe,
|
|
141
143
|
svg {
|
|
144
|
+
// Adding `display` rule here, because if `display` is not specified, 2px will be added
|
|
145
|
+
display: inline-block;
|
|
142
146
|
vertical-align: middle;
|
|
143
147
|
}
|
|
144
148
|
|
|
@@ -350,6 +354,22 @@ $color_scheme: functions.get-config($config, "color-scheme");
|
|
|
350
354
|
vertical-align: baseline;
|
|
351
355
|
}
|
|
352
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
|
+
|
|
353
373
|
// Hidden attribute
|
|
354
374
|
[hidden] {
|
|
355
375
|
display: none !important;
|