bulma-rails 0.9.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -14
  3. data/app/assets/stylesheets/bulma.scss +4 -0
  4. data/app/assets/stylesheets/sass/_index.scss +10 -0
  5. data/app/assets/stylesheets/sass/base/_index.scss +6 -0
  6. data/app/assets/stylesheets/sass/base/animations.scss +15 -0
  7. data/app/assets/stylesheets/sass/base/generic.scss +239 -0
  8. data/app/assets/stylesheets/sass/base/minireset.scss +92 -0
  9. data/app/assets/stylesheets/sass/base/skeleton.scss +126 -0
  10. data/app/assets/stylesheets/sass/components/_index.scss +13 -0
  11. data/app/assets/stylesheets/sass/components/breadcrumb.scss +139 -0
  12. data/app/assets/stylesheets/sass/components/card.scss +162 -0
  13. data/app/assets/stylesheets/sass/components/dropdown.scss +188 -0
  14. data/app/assets/stylesheets/sass/components/menu.scss +165 -0
  15. data/app/assets/stylesheets/sass/components/message.scss +183 -0
  16. data/app/assets/stylesheets/sass/components/modal.scss +164 -0
  17. data/app/assets/stylesheets/sass/components/navbar.scss +788 -0
  18. data/app/assets/stylesheets/sass/components/pagination.scss +379 -0
  19. data/app/assets/stylesheets/sass/components/panel.scss +218 -0
  20. data/app/assets/stylesheets/sass/components/tabs.scss +273 -0
  21. data/app/assets/stylesheets/sass/elements/_index.scss +16 -0
  22. data/app/assets/stylesheets/sass/elements/block.scss +6 -0
  23. data/app/assets/stylesheets/sass/elements/box.scss +59 -0
  24. data/app/assets/stylesheets/sass/elements/button.scss +640 -0
  25. data/app/assets/stylesheets/sass/elements/content.scss +283 -0
  26. data/app/assets/stylesheets/sass/elements/delete.scss +6 -0
  27. data/app/assets/stylesheets/sass/elements/icon.scss +67 -0
  28. data/app/assets/stylesheets/sass/elements/image.scss +62 -0
  29. data/app/assets/stylesheets/sass/elements/loader.scss +15 -0
  30. data/app/assets/stylesheets/sass/elements/notification.scss +105 -0
  31. data/app/assets/stylesheets/sass/elements/progress.scss +115 -0
  32. data/app/assets/stylesheets/sass/elements/table.scss +261 -0
  33. data/app/assets/stylesheets/sass/elements/tag.scss +219 -0
  34. data/app/assets/stylesheets/sass/elements/title.scss +128 -0
  35. data/app/assets/stylesheets/sass/form/_index.scss +9 -0
  36. data/app/assets/stylesheets/sass/form/checkbox-radio.scss +32 -0
  37. data/app/assets/stylesheets/sass/form/file.scss +330 -0
  38. data/app/assets/stylesheets/sass/form/input-textarea.scss +123 -0
  39. data/app/assets/stylesheets/sass/form/select.scss +143 -0
  40. data/app/assets/stylesheets/sass/form/shared.scss +172 -0
  41. data/app/assets/stylesheets/sass/form/tools.scss +341 -0
  42. data/app/assets/stylesheets/sass/grid/_index.scss +5 -0
  43. data/app/assets/stylesheets/sass/grid/columns-v2.scss +957 -0
  44. data/app/assets/stylesheets/sass/grid/columns.scss +877 -0
  45. data/app/assets/stylesheets/sass/grid/grid.scss +209 -0
  46. data/app/assets/stylesheets/sass/helpers/_index.scss +15 -0
  47. data/app/assets/stylesheets/sass/helpers/aspect-ratio.scss +10 -0
  48. data/app/assets/stylesheets/sass/helpers/border.scss +15 -0
  49. data/app/assets/stylesheets/sass/helpers/color.scss +364 -0
  50. data/app/assets/stylesheets/sass/helpers/flexbox.scss +62 -0
  51. data/app/assets/stylesheets/sass/helpers/float.scss +28 -0
  52. data/app/assets/stylesheets/sass/helpers/gap.scss +24 -0
  53. data/app/assets/stylesheets/sass/helpers/other.scss +19 -0
  54. data/app/assets/stylesheets/sass/helpers/overflow.scss +21 -0
  55. data/app/assets/stylesheets/sass/helpers/position.scss +19 -0
  56. data/app/assets/stylesheets/sass/helpers/spacing.scss +64 -0
  57. data/app/assets/stylesheets/sass/helpers/typography.scss +168 -0
  58. data/app/assets/stylesheets/sass/helpers/visibility.scss +221 -0
  59. data/app/assets/stylesheets/sass/layout/_index.scss +9 -0
  60. data/app/assets/stylesheets/sass/layout/container.scss +51 -0
  61. data/app/assets/stylesheets/sass/layout/footer.scss +23 -0
  62. data/app/assets/stylesheets/sass/layout/hero.scss +270 -0
  63. data/app/assets/stylesheets/sass/layout/level.scss +107 -0
  64. data/app/assets/stylesheets/sass/layout/media.scss +106 -0
  65. data/app/assets/stylesheets/sass/layout/section.scss +34 -0
  66. data/app/assets/stylesheets/sass/themes/_index.scss +35 -0
  67. data/app/assets/stylesheets/sass/themes/dark.scss +56 -0
  68. data/app/assets/stylesheets/sass/themes/light.scss +145 -0
  69. data/app/assets/stylesheets/sass/themes/setup.scss +174 -0
  70. data/app/assets/stylesheets/sass/utilities/_index.scss +7 -0
  71. data/app/assets/stylesheets/sass/utilities/controls.scss +85 -0
  72. data/app/assets/stylesheets/sass/utilities/css-variables.scss +425 -0
  73. data/app/assets/stylesheets/sass/utilities/derived-variables.scss +112 -0
  74. data/app/assets/stylesheets/sass/utilities/extends.scss +34 -0
  75. data/app/assets/stylesheets/sass/utilities/functions.scss +258 -0
  76. data/app/assets/stylesheets/sass/utilities/initial-variables.scss +155 -0
  77. data/app/assets/stylesheets/sass/utilities/mixins.scss +460 -0
  78. data/bulma-rails.gemspec +4 -6
  79. metadata +84 -74
  80. data/app/assets/stylesheets/bulma.sass +0 -10
  81. data/app/assets/stylesheets/sass/base/_all.sass +0 -6
  82. data/app/assets/stylesheets/sass/base/animations.sass +0 -5
  83. data/app/assets/stylesheets/sass/base/generic.sass +0 -145
  84. data/app/assets/stylesheets/sass/base/helpers.sass +0 -1
  85. data/app/assets/stylesheets/sass/base/minireset.sass +0 -79
  86. data/app/assets/stylesheets/sass/components/_all.sass +0 -15
  87. data/app/assets/stylesheets/sass/components/breadcrumb.sass +0 -77
  88. data/app/assets/stylesheets/sass/components/card.sass +0 -103
  89. data/app/assets/stylesheets/sass/components/dropdown.sass +0 -83
  90. data/app/assets/stylesheets/sass/components/level.sass +0 -79
  91. data/app/assets/stylesheets/sass/components/media.sass +0 -59
  92. data/app/assets/stylesheets/sass/components/menu.sass +0 -59
  93. data/app/assets/stylesheets/sass/components/message.sass +0 -101
  94. data/app/assets/stylesheets/sass/components/modal.sass +0 -117
  95. data/app/assets/stylesheets/sass/components/navbar.sass +0 -446
  96. data/app/assets/stylesheets/sass/components/pagination.sass +0 -167
  97. data/app/assets/stylesheets/sass/components/panel.sass +0 -121
  98. data/app/assets/stylesheets/sass/components/tabs.sass +0 -176
  99. data/app/assets/stylesheets/sass/elements/_all.sass +0 -16
  100. data/app/assets/stylesheets/sass/elements/box.sass +0 -26
  101. data/app/assets/stylesheets/sass/elements/button.sass +0 -357
  102. data/app/assets/stylesheets/sass/elements/container.sass +0 -29
  103. data/app/assets/stylesheets/sass/elements/content.sass +0 -162
  104. data/app/assets/stylesheets/sass/elements/form.sass +0 -1
  105. data/app/assets/stylesheets/sass/elements/icon.sass +0 -46
  106. data/app/assets/stylesheets/sass/elements/image.sass +0 -73
  107. data/app/assets/stylesheets/sass/elements/notification.sass +0 -52
  108. data/app/assets/stylesheets/sass/elements/other.sass +0 -31
  109. data/app/assets/stylesheets/sass/elements/progress.sass +0 -73
  110. data/app/assets/stylesheets/sass/elements/table.sass +0 -134
  111. data/app/assets/stylesheets/sass/elements/tag.sass +0 -140
  112. data/app/assets/stylesheets/sass/elements/title.sass +0 -70
  113. data/app/assets/stylesheets/sass/form/_all.sass +0 -9
  114. data/app/assets/stylesheets/sass/form/checkbox-radio.sass +0 -22
  115. data/app/assets/stylesheets/sass/form/file.sass +0 -184
  116. data/app/assets/stylesheets/sass/form/input-textarea.sass +0 -66
  117. data/app/assets/stylesheets/sass/form/select.sass +0 -88
  118. data/app/assets/stylesheets/sass/form/shared.sass +0 -60
  119. data/app/assets/stylesheets/sass/form/tools.sass +0 -215
  120. data/app/assets/stylesheets/sass/grid/_all.sass +0 -5
  121. data/app/assets/stylesheets/sass/grid/columns.sass +0 -513
  122. data/app/assets/stylesheets/sass/grid/tiles.sass +0 -36
  123. data/app/assets/stylesheets/sass/helpers/_all.sass +0 -12
  124. data/app/assets/stylesheets/sass/helpers/color.sass +0 -39
  125. data/app/assets/stylesheets/sass/helpers/flexbox.sass +0 -35
  126. data/app/assets/stylesheets/sass/helpers/float.sass +0 -10
  127. data/app/assets/stylesheets/sass/helpers/other.sass +0 -14
  128. data/app/assets/stylesheets/sass/helpers/overflow.sass +0 -2
  129. data/app/assets/stylesheets/sass/helpers/position.sass +0 -7
  130. data/app/assets/stylesheets/sass/helpers/spacing.sass +0 -31
  131. data/app/assets/stylesheets/sass/helpers/typography.sass +0 -103
  132. data/app/assets/stylesheets/sass/helpers/visibility.sass +0 -122
  133. data/app/assets/stylesheets/sass/layout/_all.sass +0 -6
  134. data/app/assets/stylesheets/sass/layout/footer.sass +0 -11
  135. data/app/assets/stylesheets/sass/layout/hero.sass +0 -153
  136. data/app/assets/stylesheets/sass/layout/section.sass +0 -17
  137. data/app/assets/stylesheets/sass/utilities/_all.sass +0 -9
  138. data/app/assets/stylesheets/sass/utilities/animations.sass +0 -1
  139. data/app/assets/stylesheets/sass/utilities/controls.sass +0 -49
  140. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +0 -114
  141. data/app/assets/stylesheets/sass/utilities/extends.sass +0 -25
  142. data/app/assets/stylesheets/sass/utilities/functions.sass +0 -135
  143. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +0 -79
  144. data/app/assets/stylesheets/sass/utilities/mixins.sass +0 -303
@@ -0,0 +1,145 @@
1
+ @use "sass:list";
2
+
3
+ @use "../utilities/css-variables" as cv;
4
+ @use "../utilities/derived-variables" as dv;
5
+ @use "../utilities/initial-variables" as iv;
6
+ @use "../utilities/functions" as fn;
7
+ @use "setup";
8
+
9
+ // The main lightness of this theme
10
+ $scheme-main-l: 100%;
11
+
12
+ // The main scheme color, used to make calculations
13
+ $scheme-main: hsl(iv.$scheme-h, iv.$scheme-s, $scheme-main-l);
14
+
15
+ @mixin light-theme {
16
+ @include cv.register-vars(
17
+ (
18
+ "scheme-h": iv.$scheme-h,
19
+ "scheme-s": iv.$scheme-s,
20
+ "light-l": iv.$light-l,
21
+ "light-invert-l": iv.$dark-l,
22
+ "dark-l": iv.$dark-l,
23
+ "dark-invert-l": iv.$light-l,
24
+ "soft-l": iv.$light-l,
25
+ "bold-l": iv.$dark-l,
26
+ "soft-invert-l": iv.$dark-l,
27
+ "bold-invert-l": iv.$light-l,
28
+
29
+ // Deltas
30
+ "hover-background-l-delta": -5%,
31
+ "active-background-l-delta": -10%,
32
+
33
+ "hover-border-l-delta": -10%,
34
+ "active-border-l-delta": -20%,
35
+
36
+ "hover-color-l-delta": -5%,
37
+ "active-color-l-delta": -10%,
38
+
39
+ "hover-shadow-a-delta": -0.05,
40
+ "active-shadow-a-delta": -0.1,
41
+
42
+ // Light only
43
+ "scheme-brightness": "light",
44
+ "scheme-main-l": $scheme-main-l,
45
+ "scheme-main-bis-l": 98%,
46
+ "scheme-main-ter-l": 96%,
47
+ "background-l": 96%,
48
+ "border-weak-l": 93%,
49
+ "border-l": 86%,
50
+ "text-weak-l": 48%,
51
+ "text-l": 29%,
52
+ "text-strong-l": 21%,
53
+ "text-title-l": 14%,
54
+ "scheme-invert-ter-l": 14%,
55
+ "scheme-invert-bis-l": 7%,
56
+ "scheme-invert-l": 4%,
57
+
58
+ // Typography
59
+ "family-primary": dv.$family-primary,
60
+ "family-secondary": dv.$family-secondary,
61
+ "family-code": dv.$family-code,
62
+ "size-small": dv.$size-small,
63
+ "size-normal": dv.$size-normal,
64
+ "size-medium": dv.$size-medium,
65
+ "size-large": dv.$size-large,
66
+ "weight-light": iv.$weight-light,
67
+ "weight-normal": iv.$weight-normal,
68
+ "weight-medium": iv.$weight-medium,
69
+ "weight-semibold": iv.$weight-semibold,
70
+ "weight-bold": iv.$weight-bold,
71
+ "weight-extrabold": iv.$weight-extrabold,
72
+
73
+ // Other
74
+ "block-spacing": iv.$block-spacing,
75
+ "duration": 294ms,
76
+ "easing": ease-out,
77
+ "radius-small": iv.$radius-small,
78
+ "radius": iv.$radius,
79
+ "radius-medium": iv.$radius-medium,
80
+ "radius-large": iv.$radius-large,
81
+ "radius-rounded": 9999px,
82
+ "speed": 86ms,
83
+
84
+ "loading-color": #{cv.getVar("border")},
85
+ "burger-h": #{cv.getVar("link-h")},
86
+ "burger-s": #{cv.getVar("link-s")},
87
+ "burger-l": #{cv.getVar("link-l")},
88
+ "burger-border-radius": 0.5em,
89
+ // Using px values to prevent half pixel issues
90
+ "burger-gap": 5px,
91
+ "burger-item-height": 2px,
92
+ "burger-item-width": 20px,
93
+ )
94
+ );
95
+
96
+ // Colors
97
+ $no-palette: ("white", "black", "light", "dark");
98
+
99
+ @each $name, $color in dv.$colors {
100
+ $base: $color;
101
+ $invert: null;
102
+ $light: null;
103
+ $dark: null;
104
+
105
+ @if type-of($color == "list") {
106
+ $base: list.nth($color, 1);
107
+
108
+ @if list.length($color) > 3 {
109
+ $invert: list.nth($color, 2);
110
+ $light: list.nth($color, 3);
111
+ $dark: list.nth($color, 4);
112
+ } @else if list.length($color) > 1 {
113
+ $invert: list.nth($color, 2);
114
+ }
115
+ }
116
+
117
+ @if list.index($no-palette, $name) {
118
+ @include cv.generate-basic-palette($name, $base, $invert);
119
+ } @else {
120
+ @include cv.generate-color-palette(
121
+ $name,
122
+ $base,
123
+ $scheme-main-l,
124
+ $invert,
125
+ $light,
126
+ $dark
127
+ );
128
+ }
129
+
130
+ @include cv.generate-on-scheme-colors($name, $base, $scheme-main);
131
+ }
132
+
133
+ // Shades
134
+ @each $name, $shade in dv.$shades {
135
+ @include cv.register-var($name, $shade);
136
+ }
137
+
138
+ @include cv.register-hsl("shadow", dv.$shadow-color);
139
+
140
+ @each $size in dv.$sizes {
141
+ $i: index(dv.$sizes, $size);
142
+ $name: "size-#{$i}";
143
+ @include cv.register-var($name, $size);
144
+ }
145
+ }
@@ -0,0 +1,174 @@
1
+ @use "../utilities/css-variables" as cv;
2
+
3
+ @mixin setup-theme() {
4
+ @include cv.register-vars(
5
+ (
6
+ // Computed
7
+ "scheme-main":
8
+ hsl(
9
+ #{cv.getVar("scheme-h")},
10
+ #{cv.getVar("scheme-s")},
11
+ #{cv.getVar("scheme-main-l")}
12
+ ),
13
+ "scheme-main-bis":
14
+ hsl(
15
+ #{cv.getVar("scheme-h")},
16
+ #{cv.getVar("scheme-s")},
17
+ #{cv.getVar("scheme-main-bis-l")}
18
+ ),
19
+ "scheme-main-ter":
20
+ hsl(
21
+ #{cv.getVar("scheme-h")},
22
+ #{cv.getVar("scheme-s")},
23
+ #{cv.getVar("scheme-main-ter-l")}
24
+ ),
25
+ "background":
26
+ hsl(
27
+ #{cv.getVar("scheme-h")},
28
+ #{cv.getVar("scheme-s")},
29
+ #{cv.getVar("background-l")}
30
+ ),
31
+ "background-hover":
32
+ hsl(
33
+ #{cv.getVar("scheme-h")},
34
+ #{cv.getVar("scheme-s")},
35
+ calc(
36
+ #{cv.getVar("background-l")} + #{cv.getVar(
37
+ "hover-background-l-delta"
38
+ )}
39
+ )
40
+ ),
41
+ "background-active":
42
+ hsl(
43
+ #{cv.getVar("scheme-h")},
44
+ #{cv.getVar("scheme-s")},
45
+ calc(
46
+ #{cv.getVar("background-l")} + #{cv.getVar(
47
+ "active-background-l-delta"
48
+ )}
49
+ )
50
+ ),
51
+ "border-weak":
52
+ hsl(
53
+ #{cv.getVar("scheme-h")},
54
+ #{cv.getVar("scheme-s")},
55
+ #{cv.getVar("border-weak-l")}
56
+ ),
57
+ "border":
58
+ hsl(
59
+ #{cv.getVar("scheme-h")},
60
+ #{cv.getVar("scheme-s")},
61
+ #{cv.getVar("border-l")}
62
+ ),
63
+ "border-hover":
64
+ hsl(
65
+ #{cv.getVar("scheme-h")},
66
+ #{cv.getVar("scheme-s")},
67
+ calc(#{cv.getVar("border-l")} + #{cv.getVar("hover-border-l-delta")})
68
+ ),
69
+ "border-active":
70
+ hsl(
71
+ #{cv.getVar("scheme-h")},
72
+ #{cv.getVar("scheme-s")},
73
+ calc(#{cv.getVar("border-l")} + #{cv.getVar("active-border-l-delta")})
74
+ ),
75
+ "text-weak":
76
+ hsl(
77
+ #{cv.getVar("text-h")},
78
+ #{cv.getVar("text-s")},
79
+ #{cv.getVar("text-weak-l")}
80
+ ),
81
+ "text":
82
+ hsl(
83
+ #{cv.getVar("text-h")},
84
+ #{cv.getVar("text-s")},
85
+ #{cv.getVar("text-l")}
86
+ ),
87
+ "text-strong":
88
+ hsl(
89
+ #{cv.getVar("text-h")},
90
+ #{cv.getVar("text-s")},
91
+ #{cv.getVar("text-strong-l")}
92
+ ),
93
+ "scheme-invert-ter":
94
+ hsl(
95
+ #{cv.getVar("scheme-h")},
96
+ #{cv.getVar("scheme-s")},
97
+ #{cv.getVar("scheme-invert-ter-l")}
98
+ ),
99
+ "scheme-invert-bis":
100
+ hsl(
101
+ #{cv.getVar("scheme-h")},
102
+ #{cv.getVar("scheme-s")},
103
+ #{cv.getVar("scheme-invert-bis-l")}
104
+ ),
105
+ "scheme-invert":
106
+ hsl(
107
+ #{cv.getVar("scheme-h")},
108
+ #{cv.getVar("scheme-s")},
109
+ #{cv.getVar("scheme-invert-l")}
110
+ ),
111
+ "link":
112
+ hsl(
113
+ #{cv.getVar("link-h")},
114
+ #{cv.getVar("link-s")},
115
+ #{cv.getVar("link-l")}
116
+ ),
117
+ "link-text":
118
+ hsl(
119
+ #{cv.getVar("link-h")},
120
+ #{cv.getVar("link-s")},
121
+ #{cv.getVar("link-on-scheme-l")}
122
+ ),
123
+ "link-text-hover":
124
+ hsl(
125
+ #{cv.getVar("link-h")},
126
+ #{cv.getVar("link-s")},
127
+ calc(
128
+ #{cv.getVar("link-on-scheme-l")} + #{cv.getVar(
129
+ "hover-color-l-delta"
130
+ )}
131
+ )
132
+ ),
133
+ "link-text-active":
134
+ hsl(
135
+ #{cv.getVar("link-h")},
136
+ #{cv.getVar("link-s")},
137
+ calc(
138
+ #{cv.getVar("link-on-scheme-l")} + #{cv.getVar(
139
+ "active-color-l-delta"
140
+ )}
141
+ )
142
+ ),
143
+ "focus-h": #{cv.getVar("link-h")},
144
+ "focus-s": #{cv.getVar("link-s")},
145
+ "focus-l": #{cv.getVar("link-l")},
146
+ "focus-offset": 1px,
147
+ "focus-style": solid,
148
+ "focus-width": 2px,
149
+ "focus-shadow-size": 0 0 0 0.1875em,
150
+ "focus-shadow-alpha": 0.25,
151
+ "code":
152
+ hsl(
153
+ #{cv.getVar("danger-h")},
154
+ #{cv.getVar("danger-s")},
155
+ #{cv.getVar("danger-on-scheme-l")}
156
+ ),
157
+ "code-background": #{cv.getVar("background")},
158
+ "pre": #{cv.getVar("text")},
159
+ "pre-background": #{cv.getVar("background")},
160
+ "shadow": (
161
+ 0 0.5em 1em -0.125em hsla(#{cv.getVar("shadow-h")}, #{cv.getVar(
162
+ "shadow-s"
163
+ )}, #{cv.getVar("shadow-l")}, 0.1),
164
+ 0 0px 0 1px
165
+ hsla(
166
+ #{cv.getVar("shadow-h")},
167
+ #{cv.getVar("shadow-s")},
168
+ #{cv.getVar("shadow-l")},
169
+ 0.02
170
+ )
171
+ )
172
+ )
173
+ );
174
+ }
@@ -0,0 +1,7 @@
1
+ /* Bulma Utilities */
2
+ @charset "utf-8";
3
+
4
+ @forward "initial-variables";
5
+ @forward "functions";
6
+ @forward "derived-variables";
7
+ @forward "controls";
@@ -0,0 +1,85 @@
1
+ @use "css-variables" as cv;
2
+ @use "derived-variables" as dv;
3
+ @use "initial-variables" as iv;
4
+
5
+ $control-radius: cv.getVar("radius") !default;
6
+ $control-radius-small: cv.getVar("radius-small") !default;
7
+
8
+ $control-border-width: 1px !default;
9
+ $control-size: cv.getVar("size-normal") !default;
10
+
11
+ $control-height: 2.5em !default;
12
+ $control-line-height: 1.5 !default;
13
+
14
+ $control-padding-vertical: calc(0.5em - #{$control-border-width}) !default;
15
+ $control-padding-horizontal: calc(0.75em - #{$control-border-width}) !default;
16
+
17
+ $control-focus-shadow-l: 50% !default;
18
+
19
+ :root {
20
+ @include cv.register-vars(
21
+ (
22
+ "control-radius": #{$control-radius},
23
+ "control-radius-small": #{$control-radius-small},
24
+ "control-border-width": #{$control-border-width},
25
+ "control-height": #{$control-height},
26
+ "control-line-height": #{$control-line-height},
27
+ "control-padding-vertical": #{$control-padding-vertical},
28
+ "control-padding-horizontal": #{$control-padding-horizontal},
29
+ "control-size": #{$control-size},
30
+ "control-focus-shadow-l": #{$control-focus-shadow-l},
31
+ )
32
+ );
33
+ }
34
+
35
+ @mixin control {
36
+ align-items: center;
37
+ appearance: none;
38
+ border-color: transparent;
39
+ border-style: solid;
40
+ border-width: cv.getVar("control-border-width");
41
+ border-radius: cv.getVar("control-radius");
42
+ box-shadow: none;
43
+ display: inline-flex;
44
+ font-size: cv.getVar("control-size");
45
+ height: cv.getVar("control-height");
46
+ justify-content: flex-start;
47
+ line-height: cv.getVar("control-line-height");
48
+ padding-bottom: cv.getVar("control-padding-vertical");
49
+ padding-left: cv.getVar("control-padding-horizontal");
50
+ padding-right: cv.getVar("control-padding-horizontal");
51
+ padding-top: cv.getVar("control-padding-vertical");
52
+ position: relative;
53
+ transition-duration: cv.getVar("duration");
54
+ transition-property: background-color, border-color, box-shadow, color;
55
+ vertical-align: top;
56
+
57
+ // States
58
+ &:focus,
59
+ &:focus-visible,
60
+ &:focus-within,
61
+ &.#{iv.$class-prefix}is-focused,
62
+ &:active,
63
+ &.#{iv.$class-prefix}is-active {
64
+ outline: none;
65
+ }
66
+
67
+ &[disabled],
68
+ fieldset[disabled] & {
69
+ cursor: not-allowed;
70
+ }
71
+ }
72
+
73
+ // The controls sizes use mixins so they can be used at different breakpoints
74
+ @mixin control-small {
75
+ border-radius: $control-radius-small;
76
+ font-size: cv.getVar("size-small");
77
+ }
78
+
79
+ @mixin control-medium {
80
+ font-size: cv.getVar("size-medium");
81
+ }
82
+
83
+ @mixin control-large {
84
+ font-size: cv.getVar("size-large");
85
+ }