@guebbit/css-toolkit 1.2.0 → 1.3.1

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 (103) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +5 -5
  3. package/docs/.postcssrc.cjs +11 -11
  4. package/docs/.vitepress/config.ts +88 -88
  5. package/docs/.vitepress/dist/404.html +4 -4
  6. package/docs/.vitepress/dist/assets/app.CE7x4Dlp.js +1 -0
  7. package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.CS_28jj8.js +1 -0
  8. package/docs/.vitepress/dist/assets/chunks/VPLocalSearchBox.TmXlq6CT.js +8 -0
  9. package/docs/.vitepress/dist/assets/chunks/framework.BZemHgQ6.js +18 -0
  10. package/docs/.vitepress/dist/assets/chunks/theme.BWSHCtHe.js +2 -0
  11. package/docs/.vitepress/dist/assets/{colors_bootstrap.md.B8QNot57.js → colors_bootstrap.md.CFg-dNGF.js} +1 -1
  12. package/docs/.vitepress/dist/assets/{colors_bootstrap.md.B8QNot57.lean.js → colors_bootstrap.md.CFg-dNGF.lean.js} +1 -1
  13. package/docs/.vitepress/dist/assets/colors_brands.md.CUxoS0ml.js +1 -0
  14. package/docs/.vitepress/dist/assets/colors_brands.md.CUxoS0ml.lean.js +1 -0
  15. package/docs/.vitepress/dist/assets/{colors_customs.md.B9XC2fYm.js → colors_customs.md.CnHhl84q.js} +1 -1
  16. package/docs/.vitepress/dist/assets/{colors_customs.md.B9XC2fYm.lean.js → colors_customs.md.CnHhl84q.lean.js} +1 -1
  17. package/docs/.vitepress/dist/assets/{functions_colors.md.8WIzA1Az.js → functions_colors.md.BsOBqU9L.js} +1 -1
  18. package/docs/.vitepress/dist/assets/functions_colors.md.BsOBqU9L.lean.js +1 -0
  19. package/docs/.vitepress/dist/assets/functions_helpers.md.B3A_IOEL.js +1 -0
  20. package/docs/.vitepress/dist/assets/functions_helpers.md.B3A_IOEL.lean.js +1 -0
  21. package/docs/.vitepress/dist/assets/{functions_strings.md.B-I-mSmy.js → functions_strings.md.BdV8Kx9J.js} +1 -1
  22. package/docs/.vitepress/dist/assets/{functions_strings.md.B-I-mSmy.lean.js → functions_strings.md.BdV8Kx9J.lean.js} +1 -1
  23. package/docs/.vitepress/dist/assets/{index.md.DO-yHYeM.js → index.md.Cn1TneoC.js} +1 -1
  24. package/docs/.vitepress/dist/assets/{index.md.DO-yHYeM.lean.js → index.md.Cn1TneoC.lean.js} +1 -1
  25. package/docs/.vitepress/dist/assets/{mixins_build-aspect-ratio.md.Cjv_a3MY.js → mixins_build-aspect-ratio.md.cD70Q1mW.js} +1 -1
  26. package/docs/.vitepress/dist/assets/{mixins_build-aspect-ratio.md.Cjv_a3MY.lean.js → mixins_build-aspect-ratio.md.cD70Q1mW.lean.js} +1 -1
  27. package/docs/.vitepress/dist/assets/{mixins_build-compatibility.md.BO6wODYa.js → mixins_build-compatibility.md.DvZg2OSO.js} +15 -4
  28. package/docs/.vitepress/dist/assets/mixins_build-compatibility.md.DvZg2OSO.lean.js +1 -0
  29. package/docs/.vitepress/dist/assets/{mixins_build-scrollbar.md.BX34elgD.js → mixins_build-scrollbar.md.Bze7PgzU.js} +1 -1
  30. package/docs/.vitepress/dist/assets/mixins_build-scrollbar.md.Bze7PgzU.lean.js +1 -0
  31. package/docs/.vitepress/dist/assets/{mixins_create-colors.md.82HeTZt6.js → mixins_create-colors.md.Bi4iqAHf.js} +1 -1
  32. package/docs/.vitepress/dist/assets/{mixins_create-colors.md.82HeTZt6.lean.js → mixins_create-colors.md.Bi4iqAHf.lean.js} +1 -1
  33. package/docs/.vitepress/dist/assets/{mixins_create-helper-margin.md.D2-T7z0a.js → mixins_create-helper-margin.md.DqwBKQ0G.js} +1 -1
  34. package/docs/.vitepress/dist/assets/mixins_create-helper-margin.md.DqwBKQ0G.lean.js +1 -0
  35. package/docs/.vitepress/dist/assets/{mixins_create-helper-padding.md.Cp-laxuA.js → mixins_create-helper-padding.md.Br9TOGl1.js} +1 -1
  36. package/docs/.vitepress/dist/assets/mixins_create-helper-padding.md.Br9TOGl1.lean.js +1 -0
  37. package/docs/.vitepress/dist/assets/{mixins_create-instruction.md.dJ83FO6R.js → mixins_create-instruction.md.BeAIoeQx.js} +15 -7
  38. package/docs/.vitepress/dist/assets/mixins_create-instruction.md.BeAIoeQx.lean.js +1 -0
  39. package/docs/.vitepress/dist/assets/style.BsKZwvOR.css +1 -0
  40. package/docs/.vitepress/dist/colors/bootstrap.html +8 -8
  41. package/docs/.vitepress/dist/colors/brands.html +8 -8
  42. package/docs/.vitepress/dist/colors/customs.html +8 -8
  43. package/docs/.vitepress/dist/functions/colors.html +8 -8
  44. package/docs/.vitepress/dist/functions/helpers.html +8 -8
  45. package/docs/.vitepress/dist/functions/strings.html +8 -8
  46. package/docs/.vitepress/dist/hashmap.json +1 -1
  47. package/docs/.vitepress/dist/index.html +8 -8
  48. package/docs/.vitepress/dist/mixins/build-aspect-ratio.html +8 -8
  49. package/docs/.vitepress/dist/mixins/build-compatibility.html +21 -10
  50. package/docs/.vitepress/dist/mixins/build-scrollbar.html +8 -8
  51. package/docs/.vitepress/dist/mixins/create-colors.html +8 -8
  52. package/docs/.vitepress/dist/mixins/create-helper-margin.html +9 -9
  53. package/docs/.vitepress/dist/mixins/create-helper-padding.html +8 -8
  54. package/docs/.vitepress/dist/mixins/create-instruction.html +21 -13
  55. package/docs/.vitepress/dist/vp-icons.css +0 -2
  56. package/docs/.vitepress/theme/index.js +11 -11
  57. package/docs/functions/colors.md +65 -65
  58. package/docs/logo.svg +55 -55
  59. package/docs/logotype.svg +149 -149
  60. package/docs/mixins/build-compatibility.md +22 -22
  61. package/docs/mixins/build-scrollbar.md +18 -18
  62. package/docs/mixins/create-helper-margin.md +25 -25
  63. package/docs/mixins/create-helper-padding.md +24 -24
  64. package/docs/mixins/create-instruction.md +32 -32
  65. package/package.json +61 -61
  66. package/src/colors/_bootstrap.scss +179 -179
  67. package/src/colors/_brands.scss +20 -20
  68. package/src/colors/_customs.scss +52 -52
  69. package/src/colors/_index.scss +199 -199
  70. package/src/functions/_colors.scss +134 -121
  71. package/src/functions/_helpers.scss +44 -42
  72. package/src/functions/_strings.scss +30 -30
  73. package/src/index.scss +13 -12
  74. package/src/mixins/_build-aspect-ratio.scss +36 -36
  75. package/src/mixins/_build-compatibility.scss +38 -27
  76. package/src/mixins/_build-scrollbar.scss +31 -31
  77. package/src/mixins/_create-class.scss +19 -0
  78. package/src/mixins/_create-colors-vars.scss +35 -0
  79. package/src/mixins/_create-colors.scss +160 -119
  80. package/src/mixins/_create-helper-margin.scss +38 -38
  81. package/src/mixins/_create-helper-padding.scss +40 -40
  82. package/test/compile.test.js +131 -105
  83. package/test/lint.test.js +48 -48
  84. package/test/test.css +5935 -986
  85. package/test/test.scss +196 -158
  86. package/vite.config.ts +25 -25
  87. package/docs/.vitepress/dist/assets/app.Cez_7bx7.js +0 -1
  88. package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.CkfJPSmi.js +0 -1
  89. package/docs/.vitepress/dist/assets/chunks/VPLocalSearchBox.lfLgIsvm.js +0 -8
  90. package/docs/.vitepress/dist/assets/chunks/framework.BQmytedh.js +0 -18
  91. package/docs/.vitepress/dist/assets/chunks/theme.ZIndENJH.js +0 -2
  92. package/docs/.vitepress/dist/assets/colors_brands.md.DA7CAmLz.js +0 -1
  93. package/docs/.vitepress/dist/assets/colors_brands.md.DA7CAmLz.lean.js +0 -1
  94. package/docs/.vitepress/dist/assets/functions_colors.md.8WIzA1Az.lean.js +0 -10
  95. package/docs/.vitepress/dist/assets/functions_helpers.md.DlnJURDc.js +0 -1
  96. package/docs/.vitepress/dist/assets/functions_helpers.md.DlnJURDc.lean.js +0 -1
  97. package/docs/.vitepress/dist/assets/mixins_build-compatibility.md.BO6wODYa.lean.js +0 -30
  98. package/docs/.vitepress/dist/assets/mixins_build-scrollbar.md.BX34elgD.lean.js +0 -32
  99. package/docs/.vitepress/dist/assets/mixins_create-helper-margin.md.D2-T7z0a.lean.js +0 -46
  100. package/docs/.vitepress/dist/assets/mixins_create-helper-padding.md.Cp-laxuA.lean.js +0 -45
  101. package/docs/.vitepress/dist/assets/mixins_create-instruction.md.dJ83FO6R.lean.js +0 -20
  102. package/docs/.vitepress/dist/assets/style.BKBz-tcN.css +0 -1
  103. package/src/mixins/_create-instructions.scss +0 -11
@@ -0,0 +1,35 @@
1
+ @use "sass:list";
2
+ @use "../functions/colors" as color-functions;
3
+
4
+ /**
5
+ * Create the CSS VARS (like on root)
6
+ * WARNING: They will be translated in "RGB" instead of "HEX"
7
+ *
8
+ * @param $color-list - list of colors (like $colors-collection: ("branch": ( "leaf: $color" )))
9
+ * @param $prefix
10
+ * @param $branch-list: - when filled: becomes a whitelist (aka: include only listed brands)
11
+ */
12
+ @mixin create-colors-vars($color-list: (), $prefix: "", $branch-list: ()) {
13
+ // for every branch
14
+ @each $branch-name, $branch in $color-list {
15
+ // check that there is no $branch-list or, if present, it's correctly whitelisted
16
+ @if list.length($branch-list) < 1 or list.index($branch-list, $branch-name) {
17
+ // for every color
18
+ @each $branch-name, $branch in $color-list {
19
+
20
+ @each $sname, $scolor in $branch {
21
+ // @if meta.type-of($scolor) == color {
22
+ --#{$prefix}#{$branch-name}-#{$sname}: #{color-functions.extract-colors($scolor)};
23
+ // _}
24
+ }
25
+
26
+ @each $sname, $scolor in $branch {
27
+ // @if meta.type-of($scolor) == color {
28
+ --#{$prefix}on-#{$branch-name}-#{$sname}: #{color-functions.extract-colors(color-functions.color-contrast($scolor))};
29
+ // _}
30
+ }
31
+
32
+ }
33
+ }
34
+ }
35
+ }
@@ -1,119 +1,160 @@
1
- @use "sass:list";
2
- @use "sass:string";
3
- @use "../functions/colors" as color-functions;
4
-
5
- /**
6
- * Create all the needed classes for the requested colors
7
- * $color-list - list of colors (like $colors-collection: ("branch": ( "leaf: $color" )))
8
- * $branch-list: - when filled: becomes a whitelist (aka: include only listed brands)
9
- * $feature-list: - when filled: becomes a whitelist. May become cumbersome and many are not needed. Use with care.
10
- * - root
11
- * - on-root (color's "best contrast" partner color)
12
- * - color
13
- * - background
14
- * - border
15
- * - pseudo (bg only, color very rarely used)
16
- * - hover
17
- * $prefix: prefix that applies to classes
18
- */
19
- @mixin create-colors($color-list: (), $branch-list: (), $feature-list: (), $prefix: "") {
20
- // for every branch
21
- @each $branch-name, $branch in $color-list {
22
- // check that there is no $branch-list or, if present, it's correctly whitelisted
23
- @if list.length($branch-list) < 1 or list.index($branch-list, $branch-name) {
24
-
25
- // for every leaf
26
- @each $sname, $scolor in $branch {
27
-
28
- @if not list.index($branch-name, "advanced"){
29
- @if list.length($feature-list) < 1 or list.index($feature-list, "color") {
30
- .#{$prefix}#{$branch-name}-#{$sname}-text {
31
- color: $scolor !important;
32
- }
33
- }
34
- @if list.length($feature-list) < 1 or list.index($feature-list, "border") {
35
- .#{$prefix}#{$branch-name}-#{$sname}-border {
36
- border-color: $scolor !important;
37
- }
38
- }
39
- }
40
-
41
- @if list.length($feature-list) < 1 or list.index($feature-list, "background") {
42
- .#{$prefix}#{$branch-name}-#{$sname}-bg {
43
- background: $scolor !important;
44
- }
45
- }
46
-
47
- @if list.length($feature-list) < 1 or list.index($feature-list, "pseudo") {
48
- .#{$prefix}#{$branch-name}-#{$sname}-pseudo-bg {
49
- &::after,
50
- &::before {
51
- background: $scolor !important;
52
- }
53
- }
54
- }
55
-
56
- @if list.length($feature-list) < 1 or list.index($feature-list, "hover"){
57
-
58
- @if not list.index($branch-name, "advanced"){
59
- @if list.length($feature-list) < 1 or list.index($feature-list, "color"){
60
- .#{$prefix}#{$branch-name}-#{$sname}-hover-text {
61
- &:hover {
62
- color: $scolor !important;
63
- }
64
- }
65
- }
66
- @if list.length($feature-list) < 1 or list.index($feature-list, "border"){
67
- .#{$prefix}#{$branch-name}-#{$sname}-hover-border {
68
- &:hover {
69
- border-color: $scolor !important;
70
- }
71
- }
72
- }
73
- }
74
-
75
- @if list.length($feature-list) < 1 or list.index($feature-list, "background") {
76
- .#{$prefix}#{$branch-name}-#{$sname}-hover-bg {
77
- &:hover {
78
- background: $scolor !important;
79
- }
80
- }
81
- }
82
-
83
- @if list.length($feature-list) < 1 or list.index($feature-list, "pseudo") {
84
- .#{$prefix}#{$branch-name}-#{$sname}-hover-pseudo-bg {
85
- &:hover{
86
- &::after,
87
- &::before {
88
- background: $scolor !important;
89
- }
90
- }
91
- }
92
- }
93
- }
94
- }
95
- }
96
- }
97
-
98
- /**
99
- * CSS VARS on root (they will be translated in "RGB" instead of "HEX"
100
- */
101
- :root{
102
- @if list.length($feature-list) < 1 or list.index($feature-list, "root"){
103
- @each $branch-name, $branch in $color-list {
104
- @each $sname, $scolor in $branch {
105
- --#{$prefix}#{$branch-name}-#{$sname}: #{color-functions.extract-colors($scolor)};
106
- }
107
- }
108
- }
109
- @if list.length($feature-list) < 1 or list.index($feature-list, "on-root"){
110
- @each $branch-name, $branch in $color-list {
111
- @each $sname, $scolor in $branch {
112
- // @if type-of($scolor) == color {
113
- --#{$prefix}on-#{$branch-name}-#{$sname}: #{color-functions.extract-colors(color-functions.color-contrast($scolor))};
114
- // _}
115
- }
116
- }
117
- }
118
- }
119
- }
1
+ @use "sass:list";
2
+ @use "sass:string";
3
+ @use "../functions/colors" as color-functions;
4
+
5
+ /**
6
+ * Create all the needed classes for the requested colors
7
+ * WARNING: $gradient-* are not meant to be used in color and border classes (because they have gradients)
8
+ *
9
+ * @param $color-list - list of colors (like $colors-collection: ("branch": ( "leaf: $color" )))
10
+ * @param $vars: if true, use css vars instead of rgb
11
+ * @param $prefix: prefix that applies to classes
12
+ * @param $prefixV: prefix that applies to vars (if true)
13
+ * @param $branch-list: - when filled: becomes a whitelist (aka: include only listed brands)
14
+ * @param $feature-list: - when filled: becomes a whitelist. May become cumbersome and many are not needed. Use with care.
15
+ * - text
16
+ * - background
17
+ * - border
18
+ * - pseudo (bg only, text very rarely used)
19
+ * - hover
20
+ */
21
+ @mixin create-colors($color-list: (), $vars: false, $prefix: "", $prefixV: "", $branch-list: (), $feature-list: ()) {
22
+ // for every branch
23
+ @each $branch-name, $branch in $color-list {
24
+ // check that there is no $branch-list or, if present, it's correctly whitelisted
25
+ @if list.length($branch-list) < 1 or list.index($branch-list, $branch-name) {
26
+
27
+ // for every leaf
28
+ @each $sname, $scolor in $branch {
29
+
30
+ @if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "text")) {
31
+ .#{$prefix}#{$branch-name}-#{$sname}-text {
32
+ @if $vars {
33
+ color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
34
+ } @else {
35
+ color: $scolor !important;
36
+ }
37
+ }
38
+ }
39
+
40
+ @if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "border")) {
41
+ @if $vars {
42
+ .#{$prefix}#{$branch-name}-#{$sname}-border {
43
+ border-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
44
+ }
45
+ } @else {
46
+ .#{$prefix}#{$branch-name}-#{$sname}-border {
47
+ border-color: $scolor !important;
48
+ }
49
+ }
50
+ }
51
+
52
+ @if list.length($feature-list) < 1 or list.index($feature-list, "background") {
53
+ @if $vars {
54
+ .#{$prefix}#{$branch-name}-#{$sname}-bg {
55
+ background-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
56
+ color: var(--#{$prefixV}on-#{$branch-name}-#{$sname}) !important;
57
+ }
58
+ } @else {
59
+ .#{$prefix}#{$branch-name}-#{$sname}-bg {
60
+ background-color: $scolor !important;
61
+ }
62
+ }
63
+ }
64
+
65
+ @if list.length($feature-list) < 1 or list.index($feature-list, "pseudo") {
66
+ @if $vars {
67
+ .#{$prefix}#{$branch-name}-#{$sname}-pseudo-bg {
68
+ &::after,
69
+ &::before {
70
+ background-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
71
+ }
72
+ }
73
+ } @else {
74
+ .#{$prefix}#{$branch-name}-#{$sname}-pseudo-bg {
75
+ &::after,
76
+ &::before {
77
+ background-color: $scolor !important;
78
+ }
79
+ }
80
+ }
81
+ }
82
+
83
+ @if list.length($feature-list) < 1 or list.index($feature-list, "hover") {
84
+
85
+ @if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "text")) {
86
+ @if $vars {
87
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-text {
88
+ &:hover {
89
+ color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
90
+ }
91
+ }
92
+ } @else {
93
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-text {
94
+ &:hover {
95
+ color: $scolor !important;
96
+ }
97
+ }
98
+ }
99
+ }
100
+
101
+ @if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "border")) {
102
+ @if $vars {
103
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-border {
104
+ &:hover {
105
+ border-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
106
+ }
107
+ }
108
+ } @else {
109
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-border {
110
+ &:hover {
111
+ border-color: $scolor !important;
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ @if list.length($feature-list) < 1 or list.index($feature-list, "background") {
118
+ @if $vars {
119
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-bg {
120
+ &:hover {
121
+ background-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
122
+ color: var(--#{$prefixV}on-#{$branch-name}-#{$sname}) !important;
123
+ }
124
+ }
125
+ } @else {
126
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-bg {
127
+ &:hover {
128
+ background-color: $scolor !important;
129
+ }
130
+ }
131
+ }
132
+ }
133
+
134
+ @if list.length($feature-list) < 1 or list.index($feature-list, "pseudo") {
135
+ @if $vars {
136
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-pseudo-bg {
137
+ &:hover {
138
+ &::after,
139
+ &::before {
140
+ background-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
141
+ }
142
+ }
143
+ }
144
+ } @else {
145
+ .#{$prefix}#{$branch-name}-#{$sname}-hover-pseudo-bg {
146
+ &:hover {
147
+ &::after,
148
+ &::before {
149
+ background-color: $scolor !important;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+
@@ -1,39 +1,39 @@
1
- /**
2
- *
3
- * t - applies the spacing for margin-top
4
- * b - applies the spacing for margin-bottom
5
- * l - applies the spacing for margin-left
6
- * r - applies the spacing for margin-right
7
- * x - applies the spacing for both *-left and *-right
8
- * y - applies the spacing for both *-top and *-bottom
9
- * a - applies the spacing for the property in all directions
10
- *
11
- * @param {Array<name,value>[]} measure-list - postfix name and value
12
- */
13
- @mixin create-helper-margin($measure-list: (), $important: false, $prefix: "") {
14
- @each $name, $val in $measure-list {
15
- .#{$prefix}mt-#{$name} {
16
- margin-top: #{$val} #{if($important == true, "!important", "")};
17
- }
18
- .#{$prefix}mb-#{$name} {
19
- margin-bottom: #{$val} #{if($important == true, "!important", "")};
20
- }
21
- .#{$prefix}ml-#{$name} {
22
- margin-left: #{$val} #{if($important == true, "!important", "")};
23
- }
24
- .#{$prefix}mr-#{$name} {
25
- margin-right: #{$val} #{if($important == true, "!important", "")};
26
- }
27
- .#{$prefix}mx-#{$name} {
28
- margin-right: #{$val} #{if($important == true, "!important", "")};
29
- margin-left: #{$val} #{if($important == true, "!important", "")};
30
- }
31
- .#{$prefix}my-#{$name} {
32
- margin-top: #{$val} #{if($important == true, "!important", "")};
33
- margin-bottom: #{$val} #{if($important == true, "!important", "")};
34
- }
35
- .#{$prefix}ma-#{$name} {
36
- margin: #{$val} #{if($important == true, "!important", "")};
37
- }
38
- }
1
+ /**
2
+ *
3
+ * t - applies the spacing for margin-top
4
+ * b - applies the spacing for margin-bottom
5
+ * l - applies the spacing for margin-left
6
+ * r - applies the spacing for margin-right
7
+ * x - applies the spacing for both *-left and *-right
8
+ * y - applies the spacing for both *-top and *-bottom
9
+ * a - applies the spacing for the property in all directions
10
+ *
11
+ * @param {Array<name,value>[]} measure-list - postfix name and value
12
+ */
13
+ @mixin create-helper-margin($measure-list: (), $important: false, $prefix: "") {
14
+ @each $name, $val in $measure-list {
15
+ .#{$prefix}mt-#{$name} {
16
+ margin-top: #{$val} #{if($important == true, "!important", "")};
17
+ }
18
+ .#{$prefix}mb-#{$name} {
19
+ margin-bottom: #{$val} #{if($important == true, "!important", "")};
20
+ }
21
+ .#{$prefix}ml-#{$name} {
22
+ margin-left: #{$val} #{if($important == true, "!important", "")};
23
+ }
24
+ .#{$prefix}mr-#{$name} {
25
+ margin-right: #{$val} #{if($important == true, "!important", "")};
26
+ }
27
+ .#{$prefix}mx-#{$name} {
28
+ margin-right: #{$val} #{if($important == true, "!important", "")};
29
+ margin-left: #{$val} #{if($important == true, "!important", "")};
30
+ }
31
+ .#{$prefix}my-#{$name} {
32
+ margin-top: #{$val} #{if($important == true, "!important", "")};
33
+ margin-bottom: #{$val} #{if($important == true, "!important", "")};
34
+ }
35
+ .#{$prefix}ma-#{$name} {
36
+ margin: #{$val} #{if($important == true, "!important", "")};
37
+ }
38
+ }
39
39
  }
@@ -1,40 +1,40 @@
1
- /**
2
- *
3
- * t - applies the spacing for padding-top
4
- * b - applies the spacing for padding-bottom
5
- * l - applies the spacing for padding-left
6
- * r - applies the spacing for padding-right
7
- * x - applies the spacing for both *-left and *-right
8
- * y - applies the spacing for both *-top and *-bottom
9
- * a - applies the spacing for the property in all directions
10
-
11
- * @param {Array<name,value>[]} measure-list - postfix name and value
12
- */
13
- @mixin create-helper-padding($measure-list: (), $important: false, $prefix: "") {
14
-
15
- @each $name, $val in $measure-list {
16
- .#{$prefix}pt-#{$name} {
17
- padding-top: #{$val} #{if($important == true, "!important", "")};
18
- }
19
- .#{$prefix}pb-#{$name} {
20
- padding-bottom: #{$val} #{if($important == true, "!important", "")};
21
- }
22
- .#{$prefix}pl-#{$name} {
23
- padding-left: #{$val} #{if($important == true, "!important", "")};
24
- }
25
- .#{$prefix}pr-#{$name} {
26
- padding-right: #{$val} #{if($important == true, "!important", "")};
27
- }
28
- .#{$prefix}px-#{$name} {
29
- padding-right: #{$val} #{if($important == true, "!important", "")};
30
- padding-left: #{$val} #{if($important == true, "!important", "")};
31
- }
32
- .#{$prefix}py-#{$name} {
33
- padding-top: #{$val} #{if($important == true, "!important", "")};
34
- padding-bottom: #{$val} #{if($important == true, "!important", "")};
35
- }
36
- .#{$prefix}pa-#{$name} {
37
- padding: #{$val} #{if($important == true, "!important", "")};
38
- }
39
- }
40
- }
1
+ /**
2
+ *
3
+ * t - applies the spacing for padding-top
4
+ * b - applies the spacing for padding-bottom
5
+ * l - applies the spacing for padding-left
6
+ * r - applies the spacing for padding-right
7
+ * x - applies the spacing for both *-left and *-right
8
+ * y - applies the spacing for both *-top and *-bottom
9
+ * a - applies the spacing for the property in all directions
10
+
11
+ * @param {Array<name,value>[]} measure-list - postfix name and value
12
+ */
13
+ @mixin create-helper-padding($measure-list: (), $important: false, $prefix: "") {
14
+
15
+ @each $name, $val in $measure-list {
16
+ .#{$prefix}pt-#{$name} {
17
+ padding-top: #{$val} #{if($important == true, "!important", "")};
18
+ }
19
+ .#{$prefix}pb-#{$name} {
20
+ padding-bottom: #{$val} #{if($important == true, "!important", "")};
21
+ }
22
+ .#{$prefix}pl-#{$name} {
23
+ padding-left: #{$val} #{if($important == true, "!important", "")};
24
+ }
25
+ .#{$prefix}pr-#{$name} {
26
+ padding-right: #{$val} #{if($important == true, "!important", "")};
27
+ }
28
+ .#{$prefix}px-#{$name} {
29
+ padding-right: #{$val} #{if($important == true, "!important", "")};
30
+ padding-left: #{$val} #{if($important == true, "!important", "")};
31
+ }
32
+ .#{$prefix}py-#{$name} {
33
+ padding-top: #{$val} #{if($important == true, "!important", "")};
34
+ padding-bottom: #{$val} #{if($important == true, "!important", "")};
35
+ }
36
+ .#{$prefix}pa-#{$name} {
37
+ padding: #{$val} #{if($important == true, "!important", "")};
38
+ }
39
+ }
40
+ }