@maggioli-design-system/styles 3.11.0 → 5.0.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.
Files changed (53) hide show
  1. package/dist/css/base.css +42 -78
  2. package/dist/css/colors-rgb.css +577 -0
  3. package/dist/css/colors.css +570 -514
  4. package/dist/css/typography.css +101 -196
  5. package/dist/tailwind/base.css +15 -5
  6. package/dist/tailwind/typography.css +79 -14
  7. package/package.json +16 -26
  8. package/postcss.config.js +1 -1
  9. package/dist/css/base.css.map +0 -1
  10. package/dist/css/base.min.css +0 -1
  11. package/dist/css/color-palette.css +0 -26045
  12. package/dist/css/color-palette.css.map +0 -1
  13. package/dist/css/color-palette.min.css +0 -1
  14. package/dist/css/colors.css.map +0 -1
  15. package/dist/css/colors.min.css +0 -1
  16. package/dist/css/components.css +0 -16
  17. package/dist/css/components.css.map +0 -1
  18. package/dist/css/components.min.css +0 -1
  19. package/dist/css/styles.css +0 -27115
  20. package/dist/css/styles.css.map +0 -1
  21. package/dist/css/styles.min.css +0 -1
  22. package/dist/css/typography.css.map +0 -1
  23. package/dist/css/typography.min.css +0 -1
  24. package/dist/scss/config.scss +0 -10
  25. package/dist/scss/export/base.scss +0 -2
  26. package/dist/scss/export/color-palette.scss +0 -2
  27. package/dist/scss/export/colors.scss +0 -2
  28. package/dist/scss/export/components.scss +0 -2
  29. package/dist/scss/export/styles.scss +0 -8
  30. package/dist/scss/export/typography.scss +0 -2
  31. package/dist/scss/extends/scroll.scss +0 -21
  32. package/dist/scss/functions/assets.scss +0 -3
  33. package/dist/scss/functions/color.scss +0 -24
  34. package/dist/scss/functions/lists.scss +0 -27
  35. package/dist/scss/functions/maps.scss +0 -54
  36. package/dist/scss/functions/math.scss +0 -18
  37. package/dist/scss/functions/media.scss +0 -10
  38. package/dist/scss/functions/scaffolding.scss +0 -8
  39. package/dist/scss/functions/strings.scss +0 -102
  40. package/dist/scss/global/base.scss +0 -101
  41. package/dist/scss/global/components/view-limit.scss +0 -9
  42. package/dist/scss/global/scaffolding/colors.scss +0 -66
  43. package/dist/scss/global/scaffolding/cosmetics.scss +0 -62
  44. package/dist/scss/global/scaffolding/tokens.scss +0 -97
  45. package/dist/scss/global/scaffolding/typography.scss +0 -17
  46. package/dist/scss/global/utility/overflow.scss +0 -9
  47. package/dist/scss/import-framework.scss +0 -13
  48. package/dist/scss/import-global.scss +0 -8
  49. package/dist/scss/mixins/export.scss +0 -49
  50. package/dist/scss/mixins/media.scss +0 -8
  51. package/dist/scss/mixins/parent.scss +0 -6
  52. package/dist/scss/mixins/scaffolding.scss +0 -83
  53. package/dist/scss/theme.scss +0 -36
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../node_modules/@maggioli-design-system/design-tokens/dist/scss/variables.scss","../../scss/global/scaffolding/typography.scss","../../scss/mixins/scaffolding.scss","../../scss/mixins/media.scss"],"names":[],"mappings":"AACA;AAAA;AAAA;AAAA;ACAE;EACE;;AAEA;EACE;;;ACqEF;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,mBAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,mBAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,mBAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;ACxBjC;EDsEE;IAlCQ,aAZuB;;;AAiD7B;EA7CE,WAJ2B;EAI3B,mBAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;ACxBjC;EDyEI;IArCM,aAZuB;;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AD3BjC;EACE;;AAEA;EACE;;;ACqEF;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;EAI3B,gBAJ2B;;;AD3BjC;EACE;;AAEA;EACE;;;ACqEF;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;;AA8C/B;EA1CI,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B;;AAiD7B;EA7CE,WAJ2B;EAI3B,aAJ2B;EAI3B,aAJ2B","file":"typography.css"}
@@ -1 +0,0 @@
1
- .text-primary{font-family:Roboto, -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Helvetica Neue, sans-serif}.text-primary::placeholder{font-family:Roboto, -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Helvetica Neue, sans-serif}.text-primary--h1{font-size:42px;font-weight:800;letter-spacing:-0.025rem;line-height:50px}.text-primary--h1::placeholder{font-size:42px;font-weight:800;letter-spacing:-0.025rem;line-height:50px}.text-primary--h2{font-size:33px;font-weight:800;letter-spacing:-0.025rem;line-height:50px}.text-primary--h2::placeholder{font-size:33px;font-weight:800;letter-spacing:-0.025rem;line-height:50px}.text-primary--h3{font-size:26px;font-weight:700;letter-spacing:-0.025rem;line-height:40px}.text-primary--h3::placeholder{font-size:26px;font-weight:700;letter-spacing:-0.025rem;line-height:40px}.text-primary--h4{font-size:20px;font-weight:600;line-height:30px}.text-primary--h4::placeholder{font-size:20px;font-weight:600;line-height:30px}.text-primary--h5{font-size:16px;font-weight:600;line-height:25px}.text-primary--h5::placeholder{font-size:16px;font-weight:600;line-height:25px}.text-primary--h6{font-size:20px;font-variant-caps:all-small-caps;font-weight:500;line-height:20px}.text-primary--h6::placeholder{font-size:20px;font-variant-caps:all-small-caps;font-weight:500;line-height:20px}.text-primary--overline{font-size:14px;font-variant-caps:all-small-caps;font-weight:500;line-height:15px}@media(min-width: 768px){.text-primary--overline{line-height:20px}}.text-primary--overline::placeholder{font-size:14px;font-variant-caps:all-small-caps;font-weight:500;line-height:15px}@media(min-width: 768px){.text-primary--overline::placeholder{line-height:20px}}.text-primary--action{font-size:14px;font-weight:500;line-height:24px}.text-primary--action::placeholder{font-size:14px;font-weight:500;line-height:24px}.text-secondary{font-family:Karla, -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Helvetica Neue, sans-serif}.text-secondary::placeholder{font-family:Karla, -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Helvetica Neue, sans-serif}.text-secondary--paragraph{font-size:20px;font-weight:400;line-height:35px}.text-secondary--paragraph::placeholder{font-size:20px;font-weight:400;line-height:35px}.text-secondary--detail{font-size:16px;font-weight:400;line-height:25px}.text-secondary--detail::placeholder{font-size:16px;font-weight:400;line-height:25px}.text-secondary--caption{font-size:13px;font-weight:400;line-height:20px}.text-secondary--caption::placeholder{font-size:13px;font-weight:400;line-height:20px}.text-secondary--label-paragraph{font-size:13px;font-weight:600;line-height:20px;text-transform:uppercase}.text-secondary--label-paragraph::placeholder{font-size:13px;font-weight:600;line-height:20px;text-transform:uppercase}.text-secondary--label-detail{font-size:12px;font-weight:600;line-height:20px;text-transform:uppercase}.text-secondary--label-detail::placeholder{font-size:12px;font-weight:600;line-height:20px;text-transform:uppercase}.text-secondary--label-caption{font-size:10px;font-weight:600;line-height:20px;text-transform:uppercase}.text-secondary--label-caption::placeholder{font-size:10px;font-weight:600;line-height:20px;text-transform:uppercase}.text-mono{font-family:Roboto Mono, monospace}.text-mono::placeholder{font-family:Roboto Mono, monospace}.text-mono--code{font-size:16px;font-weight:400;line-height:30px}.text-mono--code::placeholder{font-size:16px;font-weight:400;line-height:30px}.text-mono--hack{font-size:12px;font-weight:400;line-height:20px}.text-mono--hack::placeholder{font-size:12px;font-weight:400;line-height:20px}
@@ -1,10 +0,0 @@
1
- $config: (
2
- palette: (
3
- format: ('rgb-channels'),
4
- scaffold: ('background-color:background-color', 'color:color'),
5
- colors: ('brand.maggioli', 'status.info', 'status.success', 'status.error', 'status.warning', 'adjust.tone')
6
- ),
7
- scaffold: (
8
- properties: ('border-radius:border-radius', 'box-shadow:box-shadow', 'padding:padding', 'horizontal-padding:horizontal-padding', 'vertical-padding:vertical-padding')
9
- )
10
- )!default;
@@ -1,2 +0,0 @@
1
- @import '../import-framework';
2
- @import '../global/base';
@@ -1,2 +0,0 @@
1
- @import '../import-framework';
2
- @import '../global/scaffolding/tokens';
@@ -1,2 +0,0 @@
1
- @import '../import-framework';
2
- @import '../global/scaffolding/colors';
@@ -1,2 +0,0 @@
1
- @import '../import-framework';
2
- @import '../global/components/view-limit';
@@ -1,8 +0,0 @@
1
- @import '../import-framework';
2
- @import '../global/scaffolding/colors';
3
- @import '../global/scaffolding/cosmetics';
4
- @import '../global/scaffolding/tokens';
5
- @import '../global/scaffolding/typography';
6
- @import '../global/base';
7
- @import '../global/components/view-limit';
8
- @import '../global/utility/overflow';
@@ -1,2 +0,0 @@
1
- @import '../import-framework';
2
- @import '../global/scaffolding/typography';
@@ -1,21 +0,0 @@
1
- %scroll {
2
- overflow: auto;
3
-
4
- // sass-lint:disable no-vendor-prefixes
5
- -webkit-overflow-scrolling: touch;
6
-
7
- &::-webkit-scrollbar {
8
- background-color: transparent;
9
- display: none;
10
- }
11
-
12
- &::-webkit-scrollbar-track {
13
- background-color: transparent;
14
- display: none;
15
- }
16
-
17
- &::-webkit-scrollbar-thumb {
18
- background-color: transparent;
19
- display: none;
20
- }
21
- }
@@ -1,3 +0,0 @@
1
- @function asset ($filename) {
2
- @return url('/assets/img/#{$filename}');
3
- }
@@ -1,24 +0,0 @@
1
- @function color ($path, $contrast: '', $opacity: 1) {
2
- // color: color('brand.maggioli', 3) => color: var(--hex-brand-maggioli-03)
3
- $name: str-replace($path, '.', '-');
4
-
5
- @if $contrast != '' {
6
-
7
- $contrast: '-#{$contrast}';
8
- }
9
-
10
- @if $opacity == 1 {
11
-
12
- @if list-has-value($palette-format, 'hex') {
13
- @return var(--hex-#{$name}#{$contrast});
14
- } @else {
15
- @return RGB(var(--#{$name}#{$contrast})); /* stylelint-disable-line */
16
- }
17
- }
18
-
19
- @if list-has-value($palette-format, 'rgb-channels') {
20
- @return rgba(var(--#{$name}#{$contrast}), $opacity);
21
- } @else {
22
- @return RGB(var(--#{$name}#{$contrast})); /* stylelint-disable-line */
23
- }
24
- }
@@ -1,27 +0,0 @@
1
- @function list-has-value ($list, $search-value) {
2
- // list-has-value(('hello-world', 'foo'), 'hello') @return false
3
- // list-has-value(('hello-world', 'foo'), 'hello-world') @return true
4
-
5
- @each $value in $list {
6
-
7
- @if ($search-value == $value) {
8
- @return true;
9
- }
10
- }
11
- @return false;
12
- }
13
-
14
- @function list-like-value ($list, $search-value) {
15
- // list-like-value(('hello-world', 'foo'), 'hello') @return true
16
- // list-like-value(('hello-world', 'foo'), 'hello-world') @return true
17
-
18
- @each $value in $list {
19
- @each $name, $char in $value {
20
-
21
- @if (str-index($name, $search-value)) {
22
- @return true;
23
- }
24
- }
25
- }
26
- @return false;
27
- }
@@ -1,54 +0,0 @@
1
- @function get ($map, $search-key) {
2
- // es:
3
- // background-color: get($backgrounds, 'alto');
4
- @each $key, $value in $map {
5
-
6
- @if ('#{$key}' == '#{$search-key}') {
7
- @return $value;
8
- }
9
- }
10
- @return null;
11
-
12
- @error 'No attribute key \'#{$key}\' found inside map #{$map}\nPlease checkout your code to fine where is the problem.';
13
- }
14
-
15
- @function reverse ($map) {
16
-
17
- $result: null;
18
-
19
- @if type-of($map) == 'map' {
20
-
21
- $keys: map-keys($map);
22
- $map-reversed: ();
23
-
24
- @for $i from length($keys) through 1 {
25
-
26
- $map-reversed: map-merge($map-reversed, (nth($keys, $i): map-get($map, nth($keys, $i))));
27
- }
28
-
29
- @if type-of($map-reversed) == 'map' {
30
-
31
- $result: $map-reversed;
32
- } @else {
33
-
34
- @warn 'There was an error reversing the order of "#{$map}"';
35
- }
36
- } @else {
37
-
38
- @warn '"#{$map}" is not a valid map';
39
- }
40
-
41
- @return $result;
42
- }
43
-
44
- @function token ($path, $map, $separator: '.') {
45
-
46
- $list: str-split($path, $separator);
47
- $partial-map: $map;
48
-
49
- @each $key in $list {
50
-
51
- $partial-map: get($partial-map, $key);
52
- }
53
- @return $partial-map;
54
- }
@@ -1,18 +0,0 @@
1
- $gutter: 20px !default;
2
-
3
- @function scale-value ($value, $scale) {
4
- @return round($value * $scale);
5
- }
6
-
7
- @function spacing ($scale: 1) {
8
- @return scale-value($gutter, $scale);
9
- }
10
-
11
- @function s ($scale: 1, $value: null) {
12
-
13
- @if $value {
14
- @return scale-value($value, $scale);
15
- } @else {
16
- @return spacing($scale);
17
- }
18
- }
@@ -1,10 +0,0 @@
1
- @function rule ($viewport) {
2
-
3
- $rule: get($media, $viewport);
4
-
5
- @if type-of($rule) == 'map' {
6
- @return '#{map-keys($rule)}-width: #{get($rule, map-keys($rule))}';
7
- }
8
-
9
- @return 'min-width: #{$rule}';
10
- }
@@ -1,8 +0,0 @@
1
- @function property-name ($property, $index: 1) {
2
-
3
- @if (length(str-split($property, ':')) == 2) {
4
- @return nth(str-split($property, ':'), $index);
5
- }
6
-
7
- @return $property;
8
- }
@@ -1,102 +0,0 @@
1
- @function lead-zero ($value) {
2
-
3
- @if str-length($value) < 2 {
4
- @return '0#{$value}';
5
- }
6
-
7
- @return $value;
8
- }
9
-
10
- @function capitalize ($string) {
11
- @return to-upper-case(str-slice($string, 1, 1)) + str-slice($string, 2);
12
- }
13
-
14
- @function str-ucfirst ($string) {
15
- @return capitalize($string);
16
- }
17
-
18
- @function uncapitalize ($string) {
19
- @return to-lower-case(str-slice($string, 1, 1)) + str-slice($string, 2);
20
- }
21
-
22
- @function str-lcfirst ($string) {
23
- @return uncapitalize($string);
24
- }
25
-
26
- @function str-ucwords ($string) {
27
-
28
- $progress: $string;
29
- $result: '';
30
- $running: true;
31
-
32
- @while $running {
33
-
34
- $index: str-index($progress, ' ');
35
-
36
- @if $index {
37
-
38
- $result: $result + capitalize(str-slice($progress, 1, $index));
39
- $progress: str-slice($progress, ($index + 1));
40
- } @else {
41
-
42
- $running: false;
43
- }
44
- }
45
-
46
- @return capitalize($result) + capitalize($progress);
47
- }
48
-
49
- @function contain ($list, $value) {
50
- @return not not index($list, $value);
51
- }
52
-
53
- @function camelize ($string) {
54
-
55
- $progress: $string;
56
- $result: '';
57
- $exclude: ' ', '-', '–', '—', '_', ',', ';', ':', '.';
58
-
59
- @while str-length($progress) > 0 {
60
-
61
- $char: str-slice($progress, 1, 1);
62
-
63
- @if contain($exclude, $char) {
64
-
65
- $progress: capitalize(str-slice($progress, 2, 2)) + str-slice($progress, 3);
66
- } @else {
67
-
68
- $result: $result + $char;
69
- $progress: str-slice($progress, 2);
70
- }
71
- }
72
- @return $result;
73
- }
74
-
75
- @function str-replace ($string, $search, $replace: '') {
76
-
77
- $index: str-index($string, $search);
78
-
79
- @if $index {
80
- @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
81
- }
82
-
83
- @return $string;
84
- }
85
-
86
- @function str-split ($string, $separator) {
87
-
88
- $split-arr: ();
89
- $index: str-index($string, $separator);
90
-
91
- @while $index != null {
92
-
93
- $item: str-slice($string, 1, $index - 1);
94
- $split-arr: append($split-arr, $item);
95
- $string: str-slice($string, $index + 1);
96
- $index: str-index($string, $separator);
97
- }
98
-
99
- $split-arr: append($split-arr, $string);
100
-
101
- @return $split-arr;
102
- }
@@ -1,101 +0,0 @@
1
- $default-font-set: 'paragraph';
2
- $font-base-styles: $font-secondary-styles;
3
- $font-base-variants: $font-secondary-variants;
4
-
5
- body,
6
- html {
7
- margin: 0;
8
- }
9
-
10
- body {
11
- background-color: color('adjust.tone');
12
- color: color('adjust.tone', '03');
13
- font-family: get($font-family, 'secondary');
14
- -webkit-font-smoothing: antialiased;
15
- -moz-osx-font-smoothing: grayscale;
16
- -webkit-tap-highlight-color: transparent;
17
- text-align: -webkit-left;
18
- text-align: left;
19
- text-rendering: optimizeLegibility;
20
- text-size-adjust: 100%;
21
- width: 100%;
22
- @include apply-styles-set($map: $font-base-styles, $set: $default-font-set);
23
- }
24
-
25
- button {
26
- font-family: get($font-family, 'primary');
27
- }
28
-
29
- input,
30
- textarea {
31
- appearance: none;
32
- @include apply-styles-set($map: $font-base-styles, $set: $default-font-set);
33
-
34
- &::placeholder {
35
- user-select: none;
36
- @include apply-styles-set($map: $font-base-styles, $set: $default-font-set);
37
- }
38
- }
39
-
40
- b,
41
- strong {
42
- @include apply-styles-set($map: $font-base-variants, $set: 'bold');
43
- }
44
-
45
- a {
46
- color: color('brand.maggioli');
47
- font-family: inherit;
48
- font-size: inherit;
49
- font-weight: inherit;
50
- text-decoration: none;
51
- }
52
-
53
- a,
54
- aside,
55
- body,
56
- code,
57
- div,
58
- datalist,
59
- footer,
60
- form,
61
- h1,
62
- h2,
63
- h3,
64
- h4,
65
- h5,
66
- h6,
67
- header,
68
- hr,
69
- html,
70
- input,
71
- li,
72
- main,
73
- section,
74
- span,
75
- ul,
76
- textarea {
77
- box-sizing: border-box;
78
- }
79
-
80
- h1,
81
- h2,
82
- h3,
83
- h4,
84
- h5,
85
- h6,
86
- p {
87
- margin: 0;
88
- }
89
-
90
- button,
91
- input,
92
- optgroup,
93
- select,
94
- textarea {
95
- font-family: inherit;
96
- }
97
-
98
- ::selection {
99
- background-color: color('brand.maggioli', '15');
100
- color: color('brand.maggioli');
101
- }
@@ -1,9 +0,0 @@
1
- .view-limit {
2
- box-sizing: border-box;
3
- margin: auto;
4
- max-width: 1024px;
5
-
6
- @include media ('large') {
7
- max-width: 1280px;
8
- }
9
- }
@@ -1,66 +0,0 @@
1
- @function get-var-name ($prefix, $group-name, $tint-name, $color-name) {
2
-
3
- @if $color-name == 'color' {
4
-
5
- $color-name: '';
6
- } @else {
7
-
8
- $color-name: ' #{$color-name}';
9
- }
10
-
11
- @if $prefix == 'rgb' {
12
- @return str-replace('--#{$group-name $tint-name}#{$color-name}', ' ', '-');
13
- }
14
- @return str-replace('--#{$prefix}-#{$group-name $tint-name}#{$color-name}', ' ', '-');
15
- }
16
-
17
- @mixin scaffold-vars ($light-mode) {
18
- @each $group-name, $group-map in get($tokens, 'color') {
19
-
20
- @if list-like-value($palette-colors, $group-name) {
21
-
22
- @each $tint-name, $tints-map in $group-map {
23
-
24
- @if list-like-value($palette-colors, $tint-name) {
25
-
26
- @each $light-mode-name, $light-modes-map in $tints-map {
27
-
28
- @if ($light-mode-name == $light-mode) {
29
- @each $color-name, $color-value in $light-modes-map {
30
-
31
- @if list-has-value($palette-format, 'rgb-channels') {
32
- #{get-var-name('rgb', $group-name, $tint-name, lead-zero($color-name))}: #{red($color-value), green($color-value), blue($color-value)};
33
- }
34
-
35
- @if list-has-value($palette-format, 'hex') {
36
- #{get-var-name('hex', $group-name, $tint-name, lead-zero($color-name))}: #{$color-value};
37
- }
38
- }
39
- }
40
- }
41
- }
42
- }
43
- }
44
- }
45
- }
46
-
47
- :root {
48
- @include scaffold-vars('light');
49
-
50
- .color-mode {
51
- &--auto {
52
-
53
- @media (prefers-color-scheme: dark) { /* stylelint-disable-line */
54
- @include scaffold-vars('dark');
55
- }
56
- }
57
-
58
- &--dark {
59
- @include scaffold-vars('dark');
60
- }
61
-
62
- &--light {
63
- @include scaffold-vars('light');
64
- }
65
- }
66
- }
@@ -1,62 +0,0 @@
1
- @mixin scaffold-property-set ($name, $property, $list, $interactive: true) {
2
-
3
- @if (property-name($property, 2) == $name) {
4
-
5
- $property-selector: property-name($property, 1);
6
- $property-name: property-name($property, 2);
7
-
8
- @each $variant, $value in $list {
9
- @include scaffold-property (
10
- $property-name: $property-name,
11
- $property-selector: $property-selector,
12
- $variant: $variant,
13
- $value: $value,
14
- $interactive: $interactive
15
- );
16
- }
17
- }
18
- }
19
-
20
- @each $property in $config-scaffold-properties {
21
- @include scaffold-property-set($name: 'box-shadow', $property: $property, $list: $shadow, $interactive: true);
22
- @include scaffold-property-set($name: 'border-radius', $property: $property, $list: $radius, $interactive: true);
23
- @include scaffold-property-set($name: 'padding', $property: $property, $list: $list-sizes, $interactive: true);
24
-
25
- @if (property-name($property, 2) == 'horizontal-padding') {
26
-
27
- $property-selector: property-name($property, 1);
28
- $property-name: property-name($property, 2);
29
-
30
- @each $variant, $value in $list-sizes {
31
- .#{$property-selector}-#{$variant} {
32
- padding-left: $value !important;
33
- padding-right: $value !important;
34
- }
35
- }
36
- }
37
-
38
- @if (property-name($property, 2) == 'vertical-padding') {
39
-
40
- $property-selector: property-name($property, 1);
41
- $property-name: property-name($property, 2);
42
-
43
- @each $variant, $value in $list-sizes {
44
- .#{$property-selector}-#{$variant} {
45
- padding-bottom: $value !important;
46
- padding-top: $value !important;
47
- }
48
- }
49
- }
50
- }
51
-
52
- .transition-cosmetics {
53
- transition: box-shadow get($tween, 'hover'), border-radius get($tween, 'hover'), padding get($tween, 'hover') !important;
54
- }
55
-
56
- .transition-colors {
57
- transition: background-color get($tween, 'hover'), color get($tween, 'hover') !important;
58
- }
59
-
60
- .transition {
61
- transition: background-color get($tween, 'hover'), color get($tween, 'hover'), box-shadow get($tween, 'hover'), border-radius get($tween, 'hover'), padding get($tween, 'hover') !important;
62
- }
@@ -1,97 +0,0 @@
1
- @mixin scaffold-property-color ($property, $group-name, $tint-name, $contrast-level, $color-mode) {
2
-
3
- $selector: '';
4
-
5
- @if $contrast-level == 'color' {
6
-
7
- $selector: str-replace('#{$group-name $tint-name}', ' ', '-');
8
- } @else {
9
-
10
- $selector: str-replace('#{$group-name $tint-name $contrast-level}', ' ', '-');
11
- }
12
-
13
- $color-name: str-replace('#{$group-name $tint-name}', ' ', '.');
14
- $property-selector: property-name($property, 1);
15
- $property-name: property-name($property, 2);
16
-
17
- @if ($color-mode == 'light') {
18
- .#{$property-selector}-#{$selector} {
19
- #{$property-name}: color($color-name, $contrast-level) !important;
20
- }
21
-
22
- .hover\:#{$property-selector}-#{$selector} {
23
- &:hover {
24
- #{$property-name}: color($color-name, $contrast-level) !important;
25
- }
26
- }
27
- } @else {
28
- .color-mode {
29
- &--auto {
30
- @media (prefers-color-scheme: dark) { /* stylelint-disable-line */
31
- .dark\:#{$property-selector}-#{$selector} {
32
- #{$property-name}: color($color-name, $contrast-level) !important;
33
- }
34
- }
35
- }
36
-
37
- &--dark {
38
- .dark\:#{$property-selector}-#{$selector} {
39
- #{$property-name}: color($color-name, $contrast-level) !important;
40
- }
41
- }
42
- }
43
- }
44
- }
45
-
46
- @mixin scaffold-color-mode ($color-mode, $light-mode-name, $group-name, $tint-name, $light-modes-map) {
47
-
48
- $i: 0;
49
-
50
- @each $contrast, $contrast-value in $light-modes-map {
51
-
52
- @if $light-mode-name == $color-mode {
53
-
54
- $i: $i + 1;
55
-
56
- @each $property-name in $palette-scaffold {
57
-
58
- @include scaffold-property-color(
59
- $property: $property-name,
60
- $group-name: $group-name,
61
- $tint-name: $tint-name,
62
- $contrast-level: lead-zero($contrast),
63
- $color-mode: $color-mode
64
- );
65
- }
66
- }
67
- }
68
- }
69
-
70
- @mixin scaffold-colors ($colors) {
71
- @each $group-name, $group-map in $colors {
72
- @each $tint-name, $tints-map in $group-map {
73
- @each $light-mode-name, $light-modes-map in $tints-map {
74
-
75
- @include scaffold-color-mode (
76
- $color-mode: 'light',
77
- $light-mode-name: $light-mode-name,
78
- $group-name: $group-name,
79
- $tint-name: $tint-name,
80
- $light-modes-map: $light-modes-map
81
- );
82
-
83
- @include scaffold-color-mode (
84
- $color-mode: 'dark',
85
- $light-mode-name: $light-mode-name,
86
- $group-name: $group-name,
87
- $tint-name: $tint-name,
88
- $light-modes-map: $light-modes-map
89
- );
90
- }
91
- }
92
- }
93
- }
94
-
95
- // stylelint-disable scss/at-mixin-named-arguments
96
-
97
- @include scaffold-colors($colors: get($tokens, 'color'));