@nulllogic/scssleon 1.0.3 → 1.0.5

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.
Files changed (46) hide show
  1. package/README.md +134 -34
  2. package/package.json +12 -10
  3. package/scss/_base.scss +37 -16
  4. package/scss/_config.scss +14 -40
  5. package/scss/_content.scss +32 -8
  6. package/scss/_functions.scss +12 -25
  7. package/scss/_mixins.scss +0 -1
  8. package/scss/_reset.scss +41 -11
  9. package/scss/_root.scss +8 -13
  10. package/scss/components/_accordion.scss +4 -4
  11. package/scss/components/_alert.scss +4 -4
  12. package/scss/components/_badge.scss +4 -4
  13. package/scss/components/_breadcrumb.scss +4 -4
  14. package/scss/components/_button.scss +4 -4
  15. package/scss/components/_button_group.scss +4 -4
  16. package/scss/components/_card.scss +4 -4
  17. package/scss/components/_container.scss +19 -17
  18. package/scss/components/_dropdown.scss +11 -1
  19. package/scss/components/_form.scss +3 -44
  20. package/scss/components/_loader.scss +4 -4
  21. package/scss/components/_megamenu.scss +15 -0
  22. package/scss/components/_modal.scss +4 -4
  23. package/scss/components/_nav.scss +4 -3
  24. package/scss/components/_navbar.scss +4 -4
  25. package/scss/components/_overlay.scss +4 -4
  26. package/scss/components/_pagination.scss +4 -4
  27. package/scss/components/_placeholder.scss +4 -23
  28. package/scss/components/_sidecap.scss +4 -4
  29. package/scss/components/_table.scss +3 -3
  30. package/scss/components/_tooltip.scss +15 -0
  31. package/scss/forms/_checkbox.scss +5 -5
  32. package/scss/forms/_input-group.scss +4 -4
  33. package/scss/forms/_input.scss +4 -4
  34. package/scss/forms/_label.scss +4 -4
  35. package/scss/forms/_radio.scss +4 -4
  36. package/scss/forms/_range.scss +4 -4
  37. package/scss/forms/_select.scss +4 -4
  38. package/scss/forms/_switch.scss +4 -4
  39. package/scss/forms/_validation.scss +4 -4
  40. package/scss/mixins/_utilities.scss +1 -1
  41. package/scss/mixins/generators/_color-sheme.scss +1 -13
  42. package/scss/mixins/generators/_components.scss +79 -16
  43. package/scss/mixins/generators/_properties.scss +163 -64
  44. package/scss/scssleon.scss +49 -37
  45. package/scss/themes/_default.scss +1417 -321
  46. package/scss/mixins/generators/_wrapper.scss +0 -16
package/README.md CHANGED
@@ -1,50 +1,158 @@
1
1
  <p align="left">
2
2
  <picture>
3
3
  <source media="(prefers-color-scheme: dark)" srcset="./.imgs/header.jpg">
4
- <img alt="XII/Grid CSS framework" src="./.imgs/header.jpg">
4
+ <img alt="SCSSleon framework" src="./.imgs/header.jpg">
5
5
  </picture>
6
6
  </p>
7
- Welcome to XII/Grid CSS 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 !
7
+
8
+ # SCSSLEON [![Version Number](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnulllogic%2Fscssleon%2Frefs%2Fheads%2Fmaster%2Fpackage.json&query=%24.version&style=flat&label=version&labelColor=%23b0de48&color=%231b3317)](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="https://nulllogic.github.io/xiigrid/">Demo</a> ] — [ <a href="http://nulllogic.github.io/xiigrid/docs">Documentation</a> ] — [ <a href="https://github.com/nulllogic/xiigrid/issues">Bugs/Issues</a> ] — [ <a href="https://stackoverflow.com/questions/tagged/xiigrid">StackOverflow</a> ] –
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
- <p align="center">
16
- <a href="https://nulllogic.net/"><img src="./.imgs/logo.png" alt="NullLogic logo"></a>
17
- </p>
18
+ ## ┌ 🧭 Quickstart ┐
19
+
20
+ ### Prerequisites
21
+
22
+ - Node.js and npm installed on your system.
23
+ - Basic knowledge of SCSS and Node.js.
24
+
25
+ ### Install
26
+
27
+ <details>
28
+ <summary> Method #1 ( 🛖🔥🦴primitive ) </summary>
29
+
30
+ 1. Install packages – run the following command in your project directory to install SCSSLEON + SASS:
31
+
32
+ ```bash
33
+ npm i @nulllogic/scssleon sass
34
+ ```
35
+
36
+ 2. Initialize your project (if not already done). If your project doesn't have a package.json file, create one by running:
37
+
38
+ ```bash
39
+ npm init -y
40
+ ```
41
+
42
+ 4. Update `package.json` file. Add following strings
43
+
44
+ ```json
45
+ "scripts": {
46
+ "sass-dev": "sass --watch --update --style=expanded styles:assets/css --load-path=node_modules",
47
+ "sass-prod": "sass --no-source-map --style=compressed styles:assets/css --load-path=node_modules"
48
+ }
49
+ ```
50
+
51
+ 5. Create `app.scss` inside your project in `/styles` directory
52
+
53
+ ```scss
54
+ @use 'sass:map';
55
+ @use "sass:string";
56
+
57
+ @forward "@nulllogic/scssleon/scss/mixins";
58
+ @forward "@nulllogic/scssleon/scss/functions";
59
+
60
+ @use "@nulllogic/scssleon/scss/config.scss" as config with (
61
+ // This is main config, that you can tweak
62
+ $config: (
63
+ prefix: "xii",
64
+ enable: (
65
+ wrapper: false,
66
+ ),
67
+ )
68
+ );
69
+
70
+ @use "@nulllogic/scssleon/themes/default.scss" as theme with (
71
+ $config : config.$config,
72
+ $theme: (
73
+ html : (
74
+ body : (
75
+ _colors: (
76
+ light : (
77
+ background : rgb(244, 244, 244),
78
+ color: rgb(28, 29, 31),
79
+ ),
80
+ dark : (
81
+ background : rgb(5, 17, 4),
82
+ color: '#ccc'
83
+ )
84
+ )
85
+ )
86
+ )
87
+ )
88
+ );
89
+
90
+ $config: config.$config;
91
+ $theme: theme.$theme;
92
+ ```
93
+
94
+ 6. Create `base.scss` inside your project in `/styles/components` directory
95
+ ```scss
96
+ // Loading your SCSS module with pre-defined config and theme
97
+ // ↓ Config
98
+ @use "../app.scss" as app;
99
+
100
+ // Loading modules and components
101
+ // ↓ Root
102
+ @use "@nulllogic/scssleon/scss/root" with (
103
+ $config: app.$config,
104
+ $theme: app.$theme
105
+ );
106
+
107
+ // Great reset
108
+ @use "@nulllogic/scssleon/scss/reset" with (
109
+ $config: app.$config,
110
+ $theme: app.$theme
111
+ );
112
+
113
+ // Base
114
+ @use "@nulllogic/scssleon/scss/base" with (
115
+ $config: app.$config,
116
+ $theme: app.$theme
117
+ );
118
+
119
+ // ↓ Container
120
+ @use "@nulllogic/scssleon/scss/container" with (
121
+ $config: app.$config,
122
+ $theme: app.$theme
123
+ );
124
+ ```
125
+
126
+ 7. Run node command at root `/` of your project to generate CSS code to `/assets/css`
127
+ ```bash
128
+ npm run sass-dev
129
+ ```
18
130
 
19
- ## Quickstart
131
+ 8. Profit you now have output at `/assets/css` directory
20
132
 
21
- [![IMAGE ALT TEXT HERE](http://www.sergiuko.com/wp-content/uploads/2012/04/vimeo-preview-627x351.jpg)](https://vimeo.com/83573522)
133
+ </details>
22
134
 
23
- ## ┌ Documentation ┐
135
+
136
+ ## ┌ 📚 Documentation ┐
24
137
 
25
138
  <p align="left">
26
- <img src="./.imgs/documentation.jpg" width="100%" alt="xiigrid documentation">
139
+ <img src="./.imgs/documentation.jpg" width="100%" alt="SCSSleon documentation">
27
140
  </p>
28
141
 
29
- xiigrid's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://nulllogic.github.io/xiigrid//>. The docs may also be run locally.
142
+ SCSSleon's documentation is built with [Astro](https://astro.build/) and publicly hosted on GitHub Pages at <https://nulllogic.github.io/scssleon-docs/>. The docs may also be run locally.
30
143
 
31
- Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.
144
+ Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/).
32
145
 
33
146
  ### ─ Running documentation locally
34
147
 
35
148
  1. From the root `/` directory, run `make docs` in the command line.
36
- 2. Open `http://localhost:8000/xiigrid/` in your browser.
149
+ 2. Open `http://localhost:8000/scssleon/` in your browser.
37
150
  3. Enjoy the documentation locally
38
151
 
39
-
40
-
41
- Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
42
-
43
-
44
152
  ## ┌ Contributing ┐
45
153
 
46
154
  <p align="left">
47
- <img src="./.imgs/contributing.jpg" width="100%" alt="xiigrid contributing">
155
+ <img src="./.imgs/contributing.jpg" width="100%" alt="SCSSleon contributing">
48
156
  </p>
49
157
 
50
158
  > For contributing, please view the [CONTRIBUTING](CONTRIBUTING.md).
@@ -52,25 +160,17 @@ Learn more about using Hugo by reading its [documentation](https://gohugo.io/doc
52
160
  ## ┌ Thanks ┐
53
161
 
54
162
  <p align="left">
55
- <img src="./.imgs/thankyou.jpg" width="100%" alt="xiigrid sponsors">
163
+ <img src="./.imgs/thankyou.jpg" width="100%" alt="SCSSleon sponsors">
56
164
  </p>
57
165
 
58
166
  <a href="https://www.browserstack.com"><img src="./.imgs/browserstack.jpg" alt="browserstack"></a><br />
59
167
  Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
60
168
 
61
- ## ┌ License ┐
62
-
63
- <p align="left">
64
- <img src="./.imgs/license.jpg" width="100%" alt="xiigrid licence">
65
- </p>
66
-
169
+ ## ┌ 📜 License ┐
67
170
  [MIT license](LICENSE)
68
171
 
69
- <!--
70
- ```mermaid
71
- graph LR
72
- Frontend -->|API| Backend
73
- Backend -->|Database| PostgreSQL
74
- Backend -->|Payment| PaymentService
75
- ```
76
- -->
172
+ <hr />
173
+
174
+ <p align="center">
175
+ <a href="https://nulllogic.net/" target="_blank"><img src="./.imgs/logo.png" alt="NullLogic" aria-title="NullLogic"></a>
176
+ </p>
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.3",
5
- "version_short": "1.0",
4
+ "version": "1.0.5",
5
+ "version_short": "1.0.5",
6
6
  "keywords": [
7
7
  "css",
8
8
  "sass",
@@ -18,16 +18,15 @@
18
18
  "css": "npm run css-compile",
19
19
  "css-compile": "sass --style expanded --source-map --embed-sources scss/:dist/css/",
20
20
  "dist": "npm run css && npm run minify",
21
- "watch": "sass --watch ./scss:./dist/css",
22
- "minify": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*rtl*.css\"",
23
- "docs-build": "docker run --rm -it -v $(pwd):/src klakegg/hugo:alpine",
24
- "docs-serve": "docker run --rm -it -v $(pwd):/src -p 1313:1313 klakegg/hugo:alpine server"
21
+ "watch": "sass --watch ./scss:./dist/css"
22
+ },
23
+ "dependencies": {
24
+ "sass": "^1.89.2"
25
25
  },
26
26
  "devDependencies": {
27
- "sass": "^1.77.8",
28
- "clean-css": "^5.3.3"
27
+
29
28
  },
30
- "homepage": "https://nulllogic.github.io/scssleon",
29
+ "homepage": "https://nulllogic.github.io/scssleon-docs",
31
30
  "style": "dist/scssleon.css",
32
31
  "sass": "scss/scssleon.scss",
33
32
  "repository": {
@@ -38,5 +37,8 @@
38
37
  "license": "MIT",
39
38
  "bugs": {
40
39
  "url": "https://github.com/nulllogic/scssleon/issues"
40
+ },
41
+ "publishConfig": {
42
+ "registry": "https://registry.npmjs.org"
41
43
  }
42
- }
44
+ }
package/scss/_base.scss CHANGED
@@ -1,31 +1,52 @@
1
1
  /*
2
2
  ┌┐ ┌─┐┌─┐┌─┐
3
- ├┴┐├─┤└─┐├┤
3
+ ├┴┐├─┤└─┐├┤
4
4
  └─┘┴ ┴└─┘└─┘
5
5
  */
6
6
 
7
+ @use "sass:string";
7
8
  @use "sass:map";
8
- @use "sass:meta";
9
- @use "functions" as functions;
10
- @use "mixins" as mixins;
11
9
 
10
+ /* Load settings and functions */
11
+ @use 'mixins' as mixins;
12
+ @use 'functions' as functions;
13
+
14
+ /* SCSS variables definition requirement */
12
15
  $config: nil !default;
13
16
  $theme: nil !default;
14
17
 
15
- $prefix: functions.get-config($config, "prefix");
18
+ $color_scheme: functions.get-config($config, 'color-scheme');
16
19
 
17
- $is-reset-enabled: functions.get-config($config, "enable.reset");
18
- $is-button-pointers-enabled: functions.get-config(
19
- $config,
20
- "enable.button-pointers"
21
- );
20
+ html {
21
+ color-scheme: string.unquote($color_scheme);
22
+ }
22
23
 
23
- $is-spacing-enabled: functions.get-config($config, "enable.spacing");
24
+ // data-theme attribute is changing the color scheme
25
+ html[data-theme="dark"] {
26
+ color-scheme: dark
27
+ }
24
28
 
25
- $color_scheme: functions.get-config($config, "color-scheme");
29
+ html[data-theme="light"] {
30
+ color-scheme: light
31
+ }
26
32
 
27
- @each $tag, $properties in functions.get-theme($theme, "html") {
28
- #{$tag} {
29
- @include mixins.generate-properties(#{$tag}, $properties, $config);
33
+ @each $tag, $properties in functions.get-theme($theme, 'html') {
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
+ }
30
51
  }
31
- }
52
+ }
package/scss/_config.scss CHANGED
@@ -14,44 +14,25 @@
14
14
  $config: () !default;
15
15
 
16
16
  $default-config: (
17
- // scss-docs-start root-variables
18
- prefix: "xii",
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: 1200px,
46
- xxl: 1400px,
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, $grid-breakpoints-config);
32
+ $default-config: map.deep-merge($default-config, $breakpoints-config);
52
33
 
53
34
  $color_scheme-config: (
54
- color-scheme: "light dark",
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: true,
53
+ wrapper: false,
73
54
  ),
74
55
  );
75
56
 
@@ -87,23 +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: (
93
- dropdown: 1000,
94
- sticky: 1020,
95
- fixed: 1030,
96
- offcanvas-backdrop: 1040,
97
- offcanvas: 1045,
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
 
109
- $config: map.deep-merge($default-config, $config);
83
+ $config: map.deep-merge($default-config, $config);
@@ -3,22 +3,46 @@
3
3
  │ │ ││││ │ ├┤ │││ │
4
4
  └─┘└─┘┘└┘ ┴ └─┘┘└┘ ┴
5
5
  */
6
- @use "sass:map";
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, "enable.content");
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
- .content {
17
- @each $tag, $properties in functions.get-theme($theme, "content") {
18
- #{$tag} {
19
- @include mixins.generate-properties(#{$tag}, $properties, $config);
18
+ @each $scheme in string.split(functions.get-config($config, 'color-scheme'), ' ') {
19
+
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
+ }
20
31
  }
21
32
  }
22
- }
23
- }
24
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
+ }
45
+ }
46
+ }
47
+ }
48
+ }
@@ -1,25 +1,12 @@
1
1
  @use 'sass:list';
2
2
  @use 'sass:map';
3
+ @use 'sass:string';
3
4
 
4
- @function str-split($string, $separator) {
5
- $split-arr: ();
6
- $index : str-index($string, $separator);
7
- @while $index != null {
8
- $item: str-slice($string, 1, $index - 1);
9
- $split-arr: append($split-arr, $item);
10
- $string: str-slice($string, $index + 1);
11
- $index : str-index($string, $separator);
12
- }
13
- $split-arr: append($split-arr, $string);
14
-
15
- @return $split-arr;
16
- }
17
-
18
- @function str-replace($string, $search, $replace: '') {
19
- $index: str-index($string, $search);
5
+ @function replace($string, $search, $replace: '') {
6
+ $index: string.index($string, $search);
20
7
 
21
8
  @if $index {
22
- @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
9
+ @return string.slice($string, 1, $index - 1) + $replace + replace(string.slice($string, $index + string.length($search)), $search, $replace);
23
10
  }
24
11
 
25
12
  @return $string;
@@ -33,8 +20,8 @@
33
20
  @return nil;
34
21
  }
35
22
 
36
- @if (str-index($value, '.')) {
37
- $path: str-split($value, '.');
23
+ @if (string.index($value, '.')) {
24
+ $path: string.split($value, '.');
38
25
  $val: map.get($config, $path...);
39
26
  } @else {
40
27
  $val: map.get($config, $value);
@@ -55,8 +42,8 @@
55
42
  @return nil;
56
43
  }
57
44
 
58
- @if (str-index($value, '.')) {
59
- $path: str-split($value, '.');
45
+ @if (string.index($value, '.')) {
46
+ $path: string.split($value, '.');
60
47
  $val: map.get($theme, $path...);
61
48
  } @else {
62
49
  $val: map.get($theme, $value);
@@ -74,13 +61,13 @@
74
61
  //
75
62
  // Requires the use of quotes around data URIs.
76
63
  @function escape-svg($string) {
77
- @if str-index($string, "data:image/svg+xml") {
64
+ @if string.index($string, "data:image/svg+xml") {
78
65
  @each $char, $encoded in $escaped-characters {
79
66
  // Do not escape the url brackets
80
- @if str-index($string, "url(") == 1 {
81
- $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
67
+ @if string.index($string, "url(") == 1 {
68
+ $string: url("#{string.replace(string.slice($string, 6, -3), $char, $encoded)}");
82
69
  } @else {
83
- $string: str-replace($string, $char, $encoded);
70
+ $string: string.replace($string, $char, $encoded);
84
71
  }
85
72
  }
86
73
  }
package/scss/_mixins.scss CHANGED
@@ -11,7 +11,6 @@
11
11
  @forward "mixins/generators/color-sheme";
12
12
  @forward "mixins/generators/components";
13
13
  @forward "mixins/generators/properties";
14
- @forward "mixins/generators/wrapper";
15
14
 
16
15
  // ↓ Utilities
17
16
  @forward "mixins/utilities";
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, "prefix");
16
+ $prefix: functions.get-config($config, 'prefix');
16
17
 
17
- $is-reset-enabled: functions.get-config($config, "enable.reset");
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, "enable.spacing");
23
+ $is-spacing-enabled: functions.get-config($config, 'enable.spacing');
23
24
 
24
- $color_scheme: functions.get-config($config, "color-scheme");
25
+ $color_scheme: functions.get-config($config, 'color-scheme');
25
26
 
26
27
  @if $is-reset-enabled {
27
28
  *,
@@ -40,6 +41,23 @@ $color_scheme: functions.get-config($config, "color-scheme");
40
41
  text-decoration-skip-ink: none;
41
42
  }
42
43
 
44
+ // Headings
45
+ h1,
46
+ h2,
47
+ h3,
48
+ h4,
49
+ h5,
50
+ h6 {
51
+ margin: 0;
52
+ line-height: 1;
53
+ }
54
+
55
+ // Paragraph
56
+ p {
57
+ margin: 0;
58
+ line-height: 1;
59
+ }
60
+
43
61
  // Lists
44
62
  ul,ol,
45
63
  ol ol,
@@ -121,7 +139,10 @@ $color_scheme: functions.get-config($config, "color-scheme");
121
139
 
122
140
  // Images and content
123
141
  img,
142
+ iframe,
124
143
  svg {
144
+ // Adding `display` rule here, because if `display` is not specified, 2px will be added
145
+ display: inline-block;
125
146
  vertical-align: middle;
126
147
  }
127
148
 
@@ -211,19 +232,12 @@ $color_scheme: functions.get-config($config, "color-scheme");
211
232
  // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
212
233
  // controls in Android 4.
213
234
  // 2. Correct the inability to style clickable types in iOS and Safari.
214
- // 3. Opinionated: add "hand" cursor to non-disabled button elements.
215
235
 
216
236
  button,
217
237
  [type="button"], // 1
218
238
  [type="reset"],
219
239
  [type="submit"] {
220
240
  -webkit-appearance: button; // 2
221
-
222
- @if $is-button-pointers-enabled {
223
- &:not(:disabled) {
224
- cursor: pointer; // 3
225
- }
226
- }
227
241
  }
228
242
 
229
243
  // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
@@ -340,6 +354,22 @@ $color_scheme: functions.get-config($config, "color-scheme");
340
354
  vertical-align: baseline;
341
355
  }
342
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
+
343
373
  // Hidden attribute
344
374
  [hidden] {
345
375
  display: none !important;
package/scss/_root.scss CHANGED
@@ -13,24 +13,19 @@ $is-smooth-scroll-enabled: functions.get-config(
13
13
  "enable.smooth-scroll"
14
14
  );
15
15
 
16
- $color_scheme: functions.get-config($config, "color-scheme");
17
-
18
16
  $root-variables: functions.get-theme($theme, "root.variables");
19
17
 
20
18
  :root {
19
+ /* 🌱𖣂🫚🌿 */
20
+ @include mixins.generate-properties(
21
+ "root",
22
+ functions.get-theme($theme, "root"),
23
+ $config,
24
+ );
25
+
21
26
  @if $is-smooth-scroll-enabled {
22
27
  @media (prefers-reduced-motion: no-preference) {
23
28
  scroll-behavior: smooth;
24
29
  }
25
30
  }
26
-
27
- & {
28
- color-scheme: string.unquote($color_scheme);
29
- }
30
-
31
- @include mixins.generate-properties(
32
- "root",
33
- functions.get-theme($theme, "root"),
34
- $config
35
- );
36
- }
31
+ }