bulma-rails 0.9.4 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +48 -14
- data/app/assets/stylesheets/bulma.scss +4 -0
- data/app/assets/stylesheets/sass/_index.scss +10 -0
- data/app/assets/stylesheets/sass/base/_index.scss +6 -0
- data/app/assets/stylesheets/sass/base/animations.scss +15 -0
- data/app/assets/stylesheets/sass/base/generic.scss +239 -0
- data/app/assets/stylesheets/sass/base/minireset.scss +92 -0
- data/app/assets/stylesheets/sass/base/skeleton.scss +114 -0
- data/app/assets/stylesheets/sass/components/_index.scss +13 -0
- data/app/assets/stylesheets/sass/components/breadcrumb.scss +139 -0
- data/app/assets/stylesheets/sass/components/card.scss +162 -0
- data/app/assets/stylesheets/sass/components/dropdown.scss +188 -0
- data/app/assets/stylesheets/sass/components/menu.scss +165 -0
- data/app/assets/stylesheets/sass/components/message.scss +183 -0
- data/app/assets/stylesheets/sass/components/modal.scss +164 -0
- data/app/assets/stylesheets/sass/components/navbar.scss +788 -0
- data/app/assets/stylesheets/sass/components/pagination.scss +379 -0
- data/app/assets/stylesheets/sass/components/panel.scss +218 -0
- data/app/assets/stylesheets/sass/components/tabs.scss +273 -0
- data/app/assets/stylesheets/sass/elements/_index.scss +16 -0
- data/app/assets/stylesheets/sass/elements/block.scss +6 -0
- data/app/assets/stylesheets/sass/elements/box.scss +59 -0
- data/app/assets/stylesheets/sass/elements/button.scss +647 -0
- data/app/assets/stylesheets/sass/elements/content.scss +283 -0
- data/app/assets/stylesheets/sass/elements/delete.scss +6 -0
- data/app/assets/stylesheets/sass/elements/icon.scss +67 -0
- data/app/assets/stylesheets/sass/elements/image.scss +62 -0
- data/app/assets/stylesheets/sass/elements/loader.scss +15 -0
- data/app/assets/stylesheets/sass/elements/notification.scss +105 -0
- data/app/assets/stylesheets/sass/elements/progress.scss +115 -0
- data/app/assets/stylesheets/sass/elements/table.scss +261 -0
- data/app/assets/stylesheets/sass/elements/tag.scss +219 -0
- data/app/assets/stylesheets/sass/elements/title.scss +128 -0
- data/app/assets/stylesheets/sass/form/_index.scss +9 -0
- data/app/assets/stylesheets/sass/form/checkbox-radio.scss +32 -0
- data/app/assets/stylesheets/sass/form/file.scss +330 -0
- data/app/assets/stylesheets/sass/form/input-textarea.scss +123 -0
- data/app/assets/stylesheets/sass/form/select.scss +144 -0
- data/app/assets/stylesheets/sass/form/shared.scss +172 -0
- data/app/assets/stylesheets/sass/form/tools.scss +341 -0
- data/app/assets/stylesheets/sass/grid/_index.scss +5 -0
- data/app/assets/stylesheets/sass/grid/columns-v2.scss +957 -0
- data/app/assets/stylesheets/sass/grid/columns.scss +877 -0
- data/app/assets/stylesheets/sass/grid/grid.scss +209 -0
- data/app/assets/stylesheets/sass/helpers/_index.scss +15 -0
- data/app/assets/stylesheets/sass/helpers/aspect-ratio.scss +10 -0
- data/app/assets/stylesheets/sass/helpers/border.scss +15 -0
- data/app/assets/stylesheets/sass/helpers/color.scss +364 -0
- data/app/assets/stylesheets/sass/helpers/flexbox.scss +62 -0
- data/app/assets/stylesheets/sass/helpers/float.scss +28 -0
- data/app/assets/stylesheets/sass/helpers/gap.scss +24 -0
- data/app/assets/stylesheets/sass/helpers/other.scss +19 -0
- data/app/assets/stylesheets/sass/helpers/overflow.scss +21 -0
- data/app/assets/stylesheets/sass/helpers/position.scss +19 -0
- data/app/assets/stylesheets/sass/helpers/spacing.scss +64 -0
- data/app/assets/stylesheets/sass/helpers/typography.scss +168 -0
- data/app/assets/stylesheets/sass/helpers/visibility.scss +221 -0
- data/app/assets/stylesheets/sass/layout/_index.scss +9 -0
- data/app/assets/stylesheets/sass/layout/container.scss +51 -0
- data/app/assets/stylesheets/sass/layout/footer.scss +23 -0
- data/app/assets/stylesheets/sass/layout/hero.scss +270 -0
- data/app/assets/stylesheets/sass/layout/level.scss +107 -0
- data/app/assets/stylesheets/sass/layout/media.scss +106 -0
- data/app/assets/stylesheets/sass/layout/section.scss +34 -0
- data/app/assets/stylesheets/sass/themes/_index.scss +35 -0
- data/app/assets/stylesheets/sass/themes/dark.scss +56 -0
- data/app/assets/stylesheets/sass/themes/light.scss +146 -0
- data/app/assets/stylesheets/sass/themes/setup.scss +174 -0
- data/app/assets/stylesheets/sass/utilities/_index.scss +7 -0
- data/app/assets/stylesheets/sass/utilities/controls.scss +85 -0
- data/app/assets/stylesheets/sass/utilities/css-variables.scss +425 -0
- data/app/assets/stylesheets/sass/utilities/derived-variables.scss +112 -0
- data/app/assets/stylesheets/sass/utilities/extends.scss +34 -0
- data/app/assets/stylesheets/sass/utilities/functions.scss +258 -0
- data/app/assets/stylesheets/sass/utilities/initial-variables.scss +155 -0
- data/app/assets/stylesheets/sass/utilities/mixins.scss +460 -0
- data/bulma-rails.gemspec +4 -6
- metadata +84 -74
- data/app/assets/stylesheets/bulma.sass +0 -10
- data/app/assets/stylesheets/sass/base/_all.sass +0 -6
- data/app/assets/stylesheets/sass/base/animations.sass +0 -5
- data/app/assets/stylesheets/sass/base/generic.sass +0 -145
- data/app/assets/stylesheets/sass/base/helpers.sass +0 -1
- data/app/assets/stylesheets/sass/base/minireset.sass +0 -79
- data/app/assets/stylesheets/sass/components/_all.sass +0 -15
- data/app/assets/stylesheets/sass/components/breadcrumb.sass +0 -77
- data/app/assets/stylesheets/sass/components/card.sass +0 -103
- data/app/assets/stylesheets/sass/components/dropdown.sass +0 -83
- data/app/assets/stylesheets/sass/components/level.sass +0 -79
- data/app/assets/stylesheets/sass/components/media.sass +0 -59
- data/app/assets/stylesheets/sass/components/menu.sass +0 -59
- data/app/assets/stylesheets/sass/components/message.sass +0 -101
- data/app/assets/stylesheets/sass/components/modal.sass +0 -117
- data/app/assets/stylesheets/sass/components/navbar.sass +0 -446
- data/app/assets/stylesheets/sass/components/pagination.sass +0 -167
- data/app/assets/stylesheets/sass/components/panel.sass +0 -121
- data/app/assets/stylesheets/sass/components/tabs.sass +0 -176
- data/app/assets/stylesheets/sass/elements/_all.sass +0 -16
- data/app/assets/stylesheets/sass/elements/box.sass +0 -26
- data/app/assets/stylesheets/sass/elements/button.sass +0 -357
- data/app/assets/stylesheets/sass/elements/container.sass +0 -29
- data/app/assets/stylesheets/sass/elements/content.sass +0 -162
- data/app/assets/stylesheets/sass/elements/form.sass +0 -1
- data/app/assets/stylesheets/sass/elements/icon.sass +0 -46
- data/app/assets/stylesheets/sass/elements/image.sass +0 -73
- data/app/assets/stylesheets/sass/elements/notification.sass +0 -52
- data/app/assets/stylesheets/sass/elements/other.sass +0 -31
- data/app/assets/stylesheets/sass/elements/progress.sass +0 -73
- data/app/assets/stylesheets/sass/elements/table.sass +0 -134
- data/app/assets/stylesheets/sass/elements/tag.sass +0 -140
- data/app/assets/stylesheets/sass/elements/title.sass +0 -70
- data/app/assets/stylesheets/sass/form/_all.sass +0 -9
- data/app/assets/stylesheets/sass/form/checkbox-radio.sass +0 -22
- data/app/assets/stylesheets/sass/form/file.sass +0 -184
- data/app/assets/stylesheets/sass/form/input-textarea.sass +0 -66
- data/app/assets/stylesheets/sass/form/select.sass +0 -88
- data/app/assets/stylesheets/sass/form/shared.sass +0 -60
- data/app/assets/stylesheets/sass/form/tools.sass +0 -215
- data/app/assets/stylesheets/sass/grid/_all.sass +0 -5
- data/app/assets/stylesheets/sass/grid/columns.sass +0 -513
- data/app/assets/stylesheets/sass/grid/tiles.sass +0 -36
- data/app/assets/stylesheets/sass/helpers/_all.sass +0 -12
- data/app/assets/stylesheets/sass/helpers/color.sass +0 -39
- data/app/assets/stylesheets/sass/helpers/flexbox.sass +0 -35
- data/app/assets/stylesheets/sass/helpers/float.sass +0 -10
- data/app/assets/stylesheets/sass/helpers/other.sass +0 -14
- data/app/assets/stylesheets/sass/helpers/overflow.sass +0 -2
- data/app/assets/stylesheets/sass/helpers/position.sass +0 -7
- data/app/assets/stylesheets/sass/helpers/spacing.sass +0 -31
- data/app/assets/stylesheets/sass/helpers/typography.sass +0 -103
- data/app/assets/stylesheets/sass/helpers/visibility.sass +0 -122
- data/app/assets/stylesheets/sass/layout/_all.sass +0 -6
- data/app/assets/stylesheets/sass/layout/footer.sass +0 -11
- data/app/assets/stylesheets/sass/layout/hero.sass +0 -153
- data/app/assets/stylesheets/sass/layout/section.sass +0 -17
- data/app/assets/stylesheets/sass/utilities/_all.sass +0 -9
- data/app/assets/stylesheets/sass/utilities/animations.sass +0 -1
- data/app/assets/stylesheets/sass/utilities/controls.sass +0 -49
- data/app/assets/stylesheets/sass/utilities/derived-variables.sass +0 -114
- data/app/assets/stylesheets/sass/utilities/extends.sass +0 -25
- data/app/assets/stylesheets/sass/utilities/functions.sass +0 -135
- data/app/assets/stylesheets/sass/utilities/initial-variables.sass +0 -79
- data/app/assets/stylesheets/sass/utilities/mixins.sass +0 -303
@@ -0,0 +1,647 @@
|
|
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/extends";
|
7
|
+
@use "../utilities/mixins" as mx;
|
8
|
+
|
9
|
+
$button-h: #{cv.getVar("scheme-h")};
|
10
|
+
$button-s: #{cv.getVar("scheme-s")};
|
11
|
+
$button-l: #{cv.getVar("scheme-main-l")};
|
12
|
+
$button-background-l: #{cv.getVar("scheme-main-l")};
|
13
|
+
$button-background-l-delta: 0%;
|
14
|
+
$button-hover-background-l-delta: #{cv.getVar("hover-background-l-delta")};
|
15
|
+
$button-active-background-l-delta: #{cv.getVar("active-background-l-delta")};
|
16
|
+
$button-color-l: #{cv.getVar("text-strong-l")};
|
17
|
+
$button-border-l: #{cv.getVar("border-l")};
|
18
|
+
$button-border-l-delta: 0%;
|
19
|
+
$button-hover-border-l-delta: #{cv.getVar("hover-border-l-delta")};
|
20
|
+
$button-active-border-l-delta: #{cv.getVar("active-border-l-delta")};
|
21
|
+
$button-focus-border-l-delta: #{cv.getVar("focus-border-l-delta")};
|
22
|
+
$button-outer-shadow-h: 0;
|
23
|
+
$button-outer-shadow-s: 0%;
|
24
|
+
$button-outer-shadow-l: 20%;
|
25
|
+
$button-outer-shadow-a: 0.05;
|
26
|
+
|
27
|
+
$button-weight: cv.getVar("weight-medium") !default;
|
28
|
+
$button-family: false !default;
|
29
|
+
|
30
|
+
$button-border-color: cv.getVar("border") !default;
|
31
|
+
$button-border-style: solid !default;
|
32
|
+
$button-border-width: cv.getVar("control-border-width") !default;
|
33
|
+
|
34
|
+
$button-padding-vertical: 0.5em !default;
|
35
|
+
$button-padding-horizontal: 1em !default;
|
36
|
+
$button-rounded-padding-horizontal-offset: 0.25em !default;
|
37
|
+
|
38
|
+
$button-focus-border-color: cv.getVar("link-focus-border") !default;
|
39
|
+
$button-focus-box-shadow-size: 0 0 0 0.125em !default;
|
40
|
+
$button-focus-box-shadow-color: hsla(
|
41
|
+
#{cv.getVar("link-h")},
|
42
|
+
#{cv.getVar("link-s")},
|
43
|
+
#{cv.getVar("link-on-scheme-l")},
|
44
|
+
0.25
|
45
|
+
) !default;
|
46
|
+
|
47
|
+
$button-active-color: cv.getVar("link-active") !default;
|
48
|
+
$button-active-border-color: cv.getVar("link-active-border") !default;
|
49
|
+
|
50
|
+
$button-text-color: cv.getVar("text") !default;
|
51
|
+
$button-text-decoration: underline !default;
|
52
|
+
$button-text-hover-background-color: cv.getVar("background") !default;
|
53
|
+
$button-text-hover-color: cv.getVar("text-strong") !default;
|
54
|
+
|
55
|
+
$button-ghost-background: none !default;
|
56
|
+
$button-ghost-border-color: transparent !default;
|
57
|
+
$button-ghost-color: cv.getVar("link-text") !default;
|
58
|
+
$button-ghost-decoration: none !default;
|
59
|
+
$button-ghost-hover-color: cv.getVar("link") !default;
|
60
|
+
$button-ghost-hover-decoration: underline !default;
|
61
|
+
|
62
|
+
$button-disabled-background-color: cv.getVar("scheme-main") !default;
|
63
|
+
$button-disabled-border-color: cv.getVar("border") !default;
|
64
|
+
$button-disabled-shadow: none !default;
|
65
|
+
$button-disabled-opacity: 0.5 !default;
|
66
|
+
|
67
|
+
$button-static-color: cv.getVar("text-weak") !default;
|
68
|
+
$button-static-background-color: cv.getVar("scheme-main-ter") !default;
|
69
|
+
$button-static-border-color: cv.getVar("border") !default;
|
70
|
+
|
71
|
+
$button-colors: dv.$colors !default;
|
72
|
+
$button-responsive-sizes: (
|
73
|
+
"mobile": (
|
74
|
+
"small": calc(#{cv.getVar("size-small")} * 0.75),
|
75
|
+
"normal": calc(#{cv.getVar("size-small")} * 0.875),
|
76
|
+
"medium": cv.getVar("size-small"),
|
77
|
+
"large": cv.getVar("size-normal"),
|
78
|
+
),
|
79
|
+
"tablet-only": (
|
80
|
+
"small": calc(#{cv.getVar("size-small")} * 0.875),
|
81
|
+
"normal": cv.getVar("size-small"),
|
82
|
+
"medium": cv.getVar("size-normal"),
|
83
|
+
"large": cv.getVar("size-medium"),
|
84
|
+
),
|
85
|
+
) !default;
|
86
|
+
|
87
|
+
$no-palette: ("white", "black", "light", "dark");
|
88
|
+
|
89
|
+
.#{iv.$class-prefix}button {
|
90
|
+
@include cv.register-vars(
|
91
|
+
(
|
92
|
+
"button-family": #{$button-family},
|
93
|
+
"button-weight": #{$button-weight},
|
94
|
+
"button-border-color": #{$button-border-color},
|
95
|
+
"button-border-style": #{$button-border-style},
|
96
|
+
"button-border-width": #{$button-border-width},
|
97
|
+
"button-padding-vertical": #{$button-padding-vertical},
|
98
|
+
"button-padding-horizontal": #{$button-padding-horizontal},
|
99
|
+
"button-focus-border-color": #{$button-focus-border-color},
|
100
|
+
"button-focus-box-shadow-size": #{$button-focus-box-shadow-size},
|
101
|
+
"button-focus-box-shadow-color": #{$button-focus-box-shadow-color},
|
102
|
+
"button-active-color": #{$button-active-color},
|
103
|
+
"button-active-border-color": #{$button-active-border-color},
|
104
|
+
"button-text-color": #{$button-text-color},
|
105
|
+
"button-text-decoration": #{$button-text-decoration},
|
106
|
+
"button-text-hover-background-color": #{$button-text-hover-background-color},
|
107
|
+
"button-text-hover-color": #{$button-text-hover-color},
|
108
|
+
"button-ghost-background": #{$button-ghost-background},
|
109
|
+
"button-ghost-border-color": #{$button-ghost-border-color},
|
110
|
+
"button-ghost-color": #{$button-ghost-color},
|
111
|
+
"button-ghost-decoration": #{$button-ghost-decoration},
|
112
|
+
"button-ghost-hover-color": #{$button-ghost-hover-color},
|
113
|
+
"button-ghost-hover-decoration": #{$button-ghost-hover-decoration},
|
114
|
+
"button-disabled-background-color": #{$button-disabled-background-color},
|
115
|
+
"button-disabled-border-color": #{$button-disabled-border-color},
|
116
|
+
"button-disabled-shadow": #{$button-disabled-shadow},
|
117
|
+
"button-disabled-opacity": #{$button-disabled-opacity},
|
118
|
+
"button-static-color": #{$button-static-color},
|
119
|
+
"button-static-background-color": #{$button-static-background-color},
|
120
|
+
"button-static-border-color": #{$button-static-border-color},
|
121
|
+
)
|
122
|
+
);
|
123
|
+
}
|
124
|
+
|
125
|
+
.#{iv.$class-prefix}button {
|
126
|
+
@include cv.register-vars(
|
127
|
+
(
|
128
|
+
"button-h": #{$button-h},
|
129
|
+
"button-s": #{$button-s},
|
130
|
+
"button-l": #{$button-l},
|
131
|
+
"button-background-l": #{$button-background-l},
|
132
|
+
"button-background-l-delta": #{$button-background-l-delta},
|
133
|
+
"button-hover-background-l-delta": #{$button-hover-background-l-delta},
|
134
|
+
"button-active-background-l-delta": #{$button-active-background-l-delta},
|
135
|
+
"button-color-l": #{$button-color-l},
|
136
|
+
"button-border-l": #{$button-border-l},
|
137
|
+
"button-border-l-delta": #{$button-border-l-delta},
|
138
|
+
"button-hover-border-l-delta": #{$button-hover-border-l-delta},
|
139
|
+
"button-active-border-l-delta": #{$button-active-border-l-delta},
|
140
|
+
"button-focus-border-l-delta": #{$button-focus-border-l-delta},
|
141
|
+
"button-outer-shadow-h": #{$button-outer-shadow-h},
|
142
|
+
"button-outer-shadow-s": #{$button-outer-shadow-s},
|
143
|
+
"button-outer-shadow-l": #{$button-outer-shadow-l},
|
144
|
+
"button-outer-shadow-a": #{$button-outer-shadow-a},
|
145
|
+
"loading-color":
|
146
|
+
hsl(
|
147
|
+
#{cv.getVar("button-h")},
|
148
|
+
#{cv.getVar("button-s")},
|
149
|
+
#{cv.getVar("button-color-l")}
|
150
|
+
),
|
151
|
+
)
|
152
|
+
);
|
153
|
+
|
154
|
+
@extend %control;
|
155
|
+
@extend %unselectable;
|
156
|
+
|
157
|
+
background-color: hsl(
|
158
|
+
#{cv.getVar("button-h")},
|
159
|
+
#{cv.getVar("button-s")},
|
160
|
+
calc(
|
161
|
+
#{cv.getVar("button-background-l")} + #{cv.getVar(
|
162
|
+
"button-background-l-delta"
|
163
|
+
)}
|
164
|
+
)
|
165
|
+
);
|
166
|
+
border-color: hsl(
|
167
|
+
#{cv.getVar("button-h")},
|
168
|
+
#{cv.getVar("button-s")},
|
169
|
+
calc(
|
170
|
+
#{cv.getVar("button-border-l")} + #{cv.getVar("button-border-l-delta")}
|
171
|
+
)
|
172
|
+
);
|
173
|
+
border-style: cv.getVar("button-border-style");
|
174
|
+
border-width: cv.getVar("button-border-width");
|
175
|
+
box-shadow:
|
176
|
+
0px 0.0625em 0.125em
|
177
|
+
hsla(
|
178
|
+
cv.getVar("button-outer-shadow-h"),
|
179
|
+
cv.getVar("button-outer-shadow-s"),
|
180
|
+
cv.getVar("button-outer-shadow-l"),
|
181
|
+
cv.getVar("button-outer-shadow-a")
|
182
|
+
),
|
183
|
+
0px 0.125em 0.25em
|
184
|
+
hsla(
|
185
|
+
cv.getVar("button-outer-shadow-h"),
|
186
|
+
cv.getVar("button-outer-shadow-s"),
|
187
|
+
cv.getVar("button-outer-shadow-l"),
|
188
|
+
cv.getVar("button-outer-shadow-a")
|
189
|
+
);
|
190
|
+
color: hsl(
|
191
|
+
#{cv.getVar("button-h")},
|
192
|
+
#{cv.getVar("button-s")},
|
193
|
+
#{cv.getVar("button-color-l")}
|
194
|
+
);
|
195
|
+
cursor: pointer;
|
196
|
+
font-weight: cv.getVar("button-weight");
|
197
|
+
height: auto;
|
198
|
+
justify-content: center;
|
199
|
+
padding-bottom: calc(
|
200
|
+
#{cv.getVar("button-padding-vertical")} - #{cv.getVar(
|
201
|
+
"button-border-width"
|
202
|
+
)}
|
203
|
+
);
|
204
|
+
padding-left: calc(
|
205
|
+
#{cv.getVar("button-padding-horizontal")} - #{cv.getVar(
|
206
|
+
"button-border-width"
|
207
|
+
)}
|
208
|
+
);
|
209
|
+
padding-right: calc(
|
210
|
+
#{cv.getVar("button-padding-horizontal")} - #{cv.getVar(
|
211
|
+
"button-border-width"
|
212
|
+
)}
|
213
|
+
);
|
214
|
+
padding-top: calc(
|
215
|
+
#{cv.getVar("button-padding-vertical")} - #{cv.getVar(
|
216
|
+
"button-border-width"
|
217
|
+
)}
|
218
|
+
);
|
219
|
+
text-align: center;
|
220
|
+
white-space: nowrap;
|
221
|
+
|
222
|
+
@if $button-family {
|
223
|
+
font-family: cv.getVar("button-family");
|
224
|
+
}
|
225
|
+
|
226
|
+
strong {
|
227
|
+
color: inherit;
|
228
|
+
}
|
229
|
+
|
230
|
+
.#{iv.$class-prefix}icon {
|
231
|
+
&,
|
232
|
+
&.#{iv.$class-prefix}is-small,
|
233
|
+
&.#{iv.$class-prefix}is-medium,
|
234
|
+
&.#{iv.$class-prefix}is-large {
|
235
|
+
height: 1.5em;
|
236
|
+
width: 1.5em;
|
237
|
+
}
|
238
|
+
|
239
|
+
&:first-child:not(:last-child) {
|
240
|
+
margin-inline-start: calc(
|
241
|
+
-0.5 * #{cv.getVar("button-padding-horizontal")}
|
242
|
+
);
|
243
|
+
margin-inline-end: calc(#{cv.getVar("button-padding-horizontal")} * 0.25);
|
244
|
+
}
|
245
|
+
|
246
|
+
&:last-child:not(:first-child) {
|
247
|
+
margin-inline-start: calc(
|
248
|
+
#{cv.getVar("button-padding-horizontal")} * 0.25
|
249
|
+
);
|
250
|
+
margin-inline-end: calc(-0.5 * #{cv.getVar("button-padding-horizontal")});
|
251
|
+
}
|
252
|
+
|
253
|
+
&:first-child:last-child {
|
254
|
+
margin-inline-start: calc(
|
255
|
+
-0.5 * #{cv.getVar("button-padding-horizontal")}
|
256
|
+
);
|
257
|
+
margin-inline-end: calc(-0.5 * #{cv.getVar("button-padding-horizontal")});
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
// States
|
262
|
+
&:hover,
|
263
|
+
&.#{iv.$class-prefix}is-hovered {
|
264
|
+
@include cv.register-vars(
|
265
|
+
(
|
266
|
+
"button-background-l-delta": #{cv.getVar(
|
267
|
+
"button-hover-background-l-delta"
|
268
|
+
)},
|
269
|
+
"button-border-l-delta": #{cv.getVar("button-hover-border-l-delta")},
|
270
|
+
)
|
271
|
+
);
|
272
|
+
}
|
273
|
+
|
274
|
+
&:focus-visible,
|
275
|
+
&.#{iv.$class-prefix}is-focused {
|
276
|
+
@include cv.register-var("button-border-width", 1px);
|
277
|
+
|
278
|
+
border-color: hsl(
|
279
|
+
#{cv.getVar("focus-h")},
|
280
|
+
#{cv.getVar("focus-s")},
|
281
|
+
#{cv.getVar("focus-l")}
|
282
|
+
);
|
283
|
+
box-shadow: cv.getVar("focus-shadow-size")
|
284
|
+
hsla(
|
285
|
+
cv.getVar("focus-h"),
|
286
|
+
cv.getVar("focus-s"),
|
287
|
+
cv.getVar("focus-l"),
|
288
|
+
cv.getVar("focus-shadow-alpha")
|
289
|
+
);
|
290
|
+
}
|
291
|
+
|
292
|
+
&:active,
|
293
|
+
&.#{iv.$class-prefix}is-active {
|
294
|
+
@include cv.register-vars(
|
295
|
+
(
|
296
|
+
"button-background-l-delta": #{cv.getVar(
|
297
|
+
"button-active-background-l-delta"
|
298
|
+
)},
|
299
|
+
"button-border-l-delta": #{cv.getVar("button-active-border-l-delta")},
|
300
|
+
"button-outer-shadow-a": 0,
|
301
|
+
)
|
302
|
+
);
|
303
|
+
}
|
304
|
+
|
305
|
+
&[disabled],
|
306
|
+
fieldset[disabled] & {
|
307
|
+
background-color: cv.getVar("button-disabled-background-color");
|
308
|
+
border-color: cv.getVar("button-disabled-border-color");
|
309
|
+
box-shadow: cv.getVar("button-disabled-shadow");
|
310
|
+
opacity: cv.getVar("button-disabled-opacity");
|
311
|
+
}
|
312
|
+
|
313
|
+
// Colors
|
314
|
+
@each $name, $pair in $button-colors {
|
315
|
+
&.#{iv.$class-prefix}is-#{$name} {
|
316
|
+
@include cv.register-vars(
|
317
|
+
(
|
318
|
+
"button-h": #{cv.getVar($name, "", "-h")},
|
319
|
+
"button-s": #{cv.getVar($name, "", "-s")},
|
320
|
+
"button-l": #{cv.getVar($name, "", "-l")},
|
321
|
+
"button-background-l": #{cv.getVar($name, "", "-l")},
|
322
|
+
"button-border-l": #{cv.getVar($name, "", "-l")},
|
323
|
+
"button-border-width": 0px,
|
324
|
+
"button-color-l": #{cv.getVar($name, "", "-invert-l")},
|
325
|
+
"button-outer-shadow-a": 0,
|
326
|
+
)
|
327
|
+
);
|
328
|
+
|
329
|
+
&:focus-visible,
|
330
|
+
&.#{iv.$class-prefix}is-focused {
|
331
|
+
@include cv.register-var("button-border-width", 1px);
|
332
|
+
}
|
333
|
+
|
334
|
+
@if not list.index($no-palette, $name) {
|
335
|
+
&.#{iv.$class-prefix}is-light {
|
336
|
+
@include cv.register-vars(
|
337
|
+
(
|
338
|
+
"button-background-l": #{cv.getVar("light-l")},
|
339
|
+
"button-color-l": #{cv.getVar($name, "", "-light-invert-l")},
|
340
|
+
)
|
341
|
+
);
|
342
|
+
}
|
343
|
+
|
344
|
+
&.#{iv.$class-prefix}is-dark {
|
345
|
+
@include cv.register-vars(
|
346
|
+
(
|
347
|
+
"button-background-l": #{cv.getVar("dark-l")},
|
348
|
+
"button-color-l": #{cv.getVar($name, "", "-dark-invert-l")},
|
349
|
+
)
|
350
|
+
);
|
351
|
+
}
|
352
|
+
}
|
353
|
+
|
354
|
+
&.#{iv.$class-prefix}is-soft {
|
355
|
+
@include cv.register-vars(
|
356
|
+
(
|
357
|
+
"button-background-l": #{cv.getVar("soft-l")},
|
358
|
+
"button-color-l": #{cv.getVar("soft-invert-l")},
|
359
|
+
)
|
360
|
+
);
|
361
|
+
}
|
362
|
+
|
363
|
+
&.#{iv.$class-prefix}is-bold {
|
364
|
+
@include cv.register-vars(
|
365
|
+
(
|
366
|
+
"button-background-l": #{cv.getVar("bold-l")},
|
367
|
+
"button-color-l": #{cv.getVar("bold-invert-l")},
|
368
|
+
)
|
369
|
+
);
|
370
|
+
}
|
371
|
+
|
372
|
+
&[disabled],
|
373
|
+
fieldset[disabled] & {
|
374
|
+
background-color: cv.getVar($name);
|
375
|
+
border-color: cv.getVar($name);
|
376
|
+
box-shadow: none;
|
377
|
+
}
|
378
|
+
}
|
379
|
+
}
|
380
|
+
|
381
|
+
// Styles
|
382
|
+
&.#{iv.$class-prefix}is-outlined {
|
383
|
+
@include cv.register-vars(
|
384
|
+
(
|
385
|
+
"button-border-width": max(1px, 0.0625em),
|
386
|
+
)
|
387
|
+
);
|
388
|
+
|
389
|
+
background-color: transparent;
|
390
|
+
border-color: hsl(
|
391
|
+
#{cv.getVar("button-h")},
|
392
|
+
#{cv.getVar("button-s")},
|
393
|
+
#{cv.getVar("button-l")}
|
394
|
+
);
|
395
|
+
color: hsl(
|
396
|
+
#{cv.getVar("button-h")},
|
397
|
+
#{cv.getVar("button-s")},
|
398
|
+
#{cv.getVar("button-l")}
|
399
|
+
);
|
400
|
+
|
401
|
+
&:hover {
|
402
|
+
@include cv.register-vars(
|
403
|
+
(
|
404
|
+
"button-border-width": max(2px, 0.125em),
|
405
|
+
"button-outer-shadow-alpha": 1,
|
406
|
+
)
|
407
|
+
);
|
408
|
+
}
|
409
|
+
|
410
|
+
&:active {
|
411
|
+
@include cv.register-vars(());
|
412
|
+
}
|
413
|
+
}
|
414
|
+
|
415
|
+
&.#{iv.$class-prefix}is-inverted {
|
416
|
+
background-color: hsl(
|
417
|
+
#{cv.getVar("button-h")},
|
418
|
+
#{cv.getVar("button-s")},
|
419
|
+
calc(
|
420
|
+
#{cv.getVar("button-color-l")} + #{cv.getVar(
|
421
|
+
"button-background-l-delta"
|
422
|
+
)}
|
423
|
+
)
|
424
|
+
);
|
425
|
+
color: hsl(
|
426
|
+
#{cv.getVar("button-h")},
|
427
|
+
#{cv.getVar("button-s")},
|
428
|
+
#{cv.getVar("button-background-l")}
|
429
|
+
);
|
430
|
+
}
|
431
|
+
|
432
|
+
&.#{iv.$class-prefix}is-text {
|
433
|
+
background-color: transparent;
|
434
|
+
border-color: transparent;
|
435
|
+
color: cv.getVar("button-text-color");
|
436
|
+
text-decoration: cv.getVar("button-text-decoration");
|
437
|
+
|
438
|
+
&:hover,
|
439
|
+
&.#{iv.$class-prefix}is-hovered {
|
440
|
+
background-color: cv.getVar("button-text-hover-background-color");
|
441
|
+
color: cv.getVar("button-text-hover-color");
|
442
|
+
}
|
443
|
+
|
444
|
+
&:active,
|
445
|
+
&.#{iv.$class-prefix}is-active {
|
446
|
+
// background-color: bulmaDarken($button-text-hover-background-color, 5%);
|
447
|
+
color: cv.getVar("button-text-hover-color");
|
448
|
+
}
|
449
|
+
|
450
|
+
&[disabled],
|
451
|
+
fieldset[disabled] & {
|
452
|
+
background-color: transparent;
|
453
|
+
border-color: transparent;
|
454
|
+
box-shadow: none;
|
455
|
+
}
|
456
|
+
}
|
457
|
+
|
458
|
+
&.#{iv.$class-prefix}is-ghost {
|
459
|
+
background: cv.getVar("button-ghost-background");
|
460
|
+
border-color: cv.getVar("button-ghost-border-color");
|
461
|
+
box-shadow: none;
|
462
|
+
color: cv.getVar("button-ghost-color");
|
463
|
+
text-decoration: cv.getVar("button-ghost-decoration");
|
464
|
+
|
465
|
+
&:hover,
|
466
|
+
&.#{iv.$class-prefix}is-hovered {
|
467
|
+
color: cv.getVar("button-ghost-hover-color");
|
468
|
+
text-decoration: cv.getVar("button-ghost-hover-decoration");
|
469
|
+
}
|
470
|
+
}
|
471
|
+
|
472
|
+
// Sizes
|
473
|
+
&.#{iv.$class-prefix}is-small {
|
474
|
+
@include cv.register-vars(
|
475
|
+
(
|
476
|
+
"control-size": #{cv.getVar("size-small")},
|
477
|
+
"control-radius": #{cv.getVar("radius-small")},
|
478
|
+
)
|
479
|
+
);
|
480
|
+
}
|
481
|
+
|
482
|
+
&.#{iv.$class-prefix}is-normal {
|
483
|
+
@include cv.register-vars(
|
484
|
+
(
|
485
|
+
"control-size": #{cv.getVar("size-normal")},
|
486
|
+
"control-radius": #{cv.getVar("radius")},
|
487
|
+
)
|
488
|
+
);
|
489
|
+
}
|
490
|
+
|
491
|
+
&.#{iv.$class-prefix}is-medium {
|
492
|
+
@include cv.register-vars(
|
493
|
+
(
|
494
|
+
"control-size": #{cv.getVar("size-medium")},
|
495
|
+
"control-radius": #{cv.getVar("radius-medium")},
|
496
|
+
)
|
497
|
+
);
|
498
|
+
}
|
499
|
+
|
500
|
+
&.#{iv.$class-prefix}is-large {
|
501
|
+
@include cv.register-vars(
|
502
|
+
(
|
503
|
+
"control-size": #{cv.getVar("size-large")},
|
504
|
+
"control-radius": #{cv.getVar("radius-medium")},
|
505
|
+
)
|
506
|
+
);
|
507
|
+
}
|
508
|
+
|
509
|
+
// Modifiers
|
510
|
+
&.#{iv.$class-prefix}is-fullwidth {
|
511
|
+
display: flex;
|
512
|
+
width: 100%;
|
513
|
+
}
|
514
|
+
|
515
|
+
&.#{iv.$class-prefix}is-loading {
|
516
|
+
box-shadow: none;
|
517
|
+
color: transparent !important;
|
518
|
+
pointer-events: none;
|
519
|
+
|
520
|
+
&::after {
|
521
|
+
@extend %loader;
|
522
|
+
@include mx.center(1em);
|
523
|
+
position: absolute !important;
|
524
|
+
}
|
525
|
+
}
|
526
|
+
|
527
|
+
&.#{iv.$class-prefix}is-static {
|
528
|
+
background-color: cv.getVar("button-static-background-color");
|
529
|
+
border-color: cv.getVar("button-static-border-color");
|
530
|
+
color: cv.getVar("button-static-color");
|
531
|
+
box-shadow: none;
|
532
|
+
pointer-events: none;
|
533
|
+
}
|
534
|
+
|
535
|
+
&.#{iv.$class-prefix}is-rounded {
|
536
|
+
border-radius: cv.getVar("radius-rounded");
|
537
|
+
padding-left: calc(
|
538
|
+
#{cv.getVar("button-padding-horizontal")} + #{$button-rounded-padding-horizontal-offset} -
|
539
|
+
#{cv.getVar("button-border-width")}
|
540
|
+
);
|
541
|
+
padding-right: calc(
|
542
|
+
#{cv.getVar("button-padding-horizontal")} + #{$button-rounded-padding-horizontal-offset} -
|
543
|
+
#{cv.getVar("button-border-width")}
|
544
|
+
);
|
545
|
+
}
|
546
|
+
}
|
547
|
+
|
548
|
+
.#{iv.$class-prefix}buttons {
|
549
|
+
@extend %block;
|
550
|
+
align-items: center;
|
551
|
+
display: flex;
|
552
|
+
flex-wrap: wrap;
|
553
|
+
gap: 0.75rem;
|
554
|
+
justify-content: flex-start;
|
555
|
+
|
556
|
+
// Sizes
|
557
|
+
&.#{iv.$class-prefix}are-small {
|
558
|
+
@include cv.register-vars(
|
559
|
+
(
|
560
|
+
"control-size": #{cv.getVar("size-small")},
|
561
|
+
"control-radius": #{cv.getVar("radius-small")},
|
562
|
+
)
|
563
|
+
);
|
564
|
+
}
|
565
|
+
|
566
|
+
&.#{iv.$class-prefix}are-medium {
|
567
|
+
@include cv.register-vars(
|
568
|
+
(
|
569
|
+
"control-size": #{cv.getVar("size-medium")},
|
570
|
+
"control-radius": #{cv.getVar("radius-medium")},
|
571
|
+
)
|
572
|
+
);
|
573
|
+
}
|
574
|
+
|
575
|
+
&.#{iv.$class-prefix}are-large {
|
576
|
+
@include cv.register-vars(
|
577
|
+
(
|
578
|
+
"control-size": #{cv.getVar("size-large")},
|
579
|
+
"control-radius": #{cv.getVar("radius-large")},
|
580
|
+
)
|
581
|
+
);
|
582
|
+
}
|
583
|
+
|
584
|
+
&.#{iv.$class-prefix}has-addons {
|
585
|
+
gap: 0;
|
586
|
+
|
587
|
+
.#{iv.$class-prefix}button {
|
588
|
+
&:not(:first-child) {
|
589
|
+
border-end-start-radius: 0;
|
590
|
+
border-start-start-radius: 0;
|
591
|
+
}
|
592
|
+
|
593
|
+
&:not(:last-child) {
|
594
|
+
border-end-end-radius: 0;
|
595
|
+
border-start-end-radius: 0;
|
596
|
+
margin-inline-end: -1px;
|
597
|
+
}
|
598
|
+
|
599
|
+
&:hover,
|
600
|
+
&.#{iv.$class-prefix}is-hovered {
|
601
|
+
z-index: 2;
|
602
|
+
}
|
603
|
+
|
604
|
+
&:focus,
|
605
|
+
&.#{iv.$class-prefix}is-focused,
|
606
|
+
&:active,
|
607
|
+
&.#{iv.$class-prefix}is-active,
|
608
|
+
&.#{iv.$class-prefix}is-selected {
|
609
|
+
z-index: 3;
|
610
|
+
|
611
|
+
&:hover {
|
612
|
+
z-index: 4;
|
613
|
+
}
|
614
|
+
}
|
615
|
+
|
616
|
+
&.#{iv.$class-prefix}is-expanded {
|
617
|
+
flex-grow: 1;
|
618
|
+
flex-shrink: 1;
|
619
|
+
}
|
620
|
+
}
|
621
|
+
}
|
622
|
+
|
623
|
+
&.#{iv.$class-prefix}is-centered {
|
624
|
+
justify-content: center;
|
625
|
+
}
|
626
|
+
|
627
|
+
&.#{iv.$class-prefix}is-right {
|
628
|
+
justify-content: flex-end;
|
629
|
+
}
|
630
|
+
}
|
631
|
+
|
632
|
+
@each $bp-name, $bp-sizes in $button-responsive-sizes {
|
633
|
+
@include mx.breakpoint($bp-name) {
|
634
|
+
@each $size, $value in $bp-sizes {
|
635
|
+
@if $size != "normal" {
|
636
|
+
.#{iv.$class-prefix}button.#{iv.$class-prefix}is-responsive.#{iv.$class-prefix}is-#{$size} {
|
637
|
+
font-size: $value;
|
638
|
+
}
|
639
|
+
} @else {
|
640
|
+
.#{iv.$class-prefix}button.#{iv.$class-prefix}is-responsive,
|
641
|
+
.#{iv.$class-prefix}button.#{iv.$class-prefix}is-responsive.#{iv.$class-prefix}is-normal {
|
642
|
+
font-size: $value;
|
643
|
+
}
|
644
|
+
}
|
645
|
+
}
|
646
|
+
}
|
647
|
+
}
|