Skip to content

Commit bcd16ca

Browse files
committed
TMS-1164: Small modifications for button hovers
1 parent 3987c36 commit bcd16ca

File tree

4 files changed

+42
-41
lines changed

4 files changed

+42
-41
lines changed

assets/styles/base/_typography.scss

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,6 @@ a {
2626
outline: .15rem dotted;
2727
outline-offset: .2rem;
2828
}
29-
30-
&.has-background-primary {
31-
&:hover,
32-
&:focus {
33-
background-color: $link-hover !important; // sass-lint:disable-line no-important
34-
}
35-
36-
&:active {
37-
background-color: $link-active !important; // sass-lint:disable-line no-important
38-
}
39-
}
40-
41-
&.has-background-accent {
42-
&:hover,
43-
&:focus {
44-
background-color: $link-hover !important; // sass-lint:disable-line no-important
45-
}
46-
47-
&:active {
48-
background-color: $link-active !important; // sass-lint:disable-line no-important
49-
}
50-
}
5129
}
5230

5331
.has-text-paragraph {

assets/styles/helpers/_button.scss

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ $button-transition-speed: $speed !default;
137137
&.is-outlined {
138138
&,
139139
&:active,
140-
&.is-active {
140+
&.is-active,
141+
&:hover,
142+
&.is-hovered,
143+
&:focus,
144+
&.is-focused {
141145
background-color: transparent;
142146
border-color: $button-border-invert;
143147
color: $button-text-invert;
@@ -153,7 +157,11 @@ $button-transition-speed: $speed !default;
153157
&.is-borderless {
154158
&,
155159
&:active,
156-
&.is-active {
160+
&.is-active,
161+
&:hover,
162+
&.is-hovered,
163+
&:focus,
164+
&.is-focused {
157165
background-color: $button-background-primary;
158166
border-color: transparent;
159167
color: $button-text-primary;
@@ -180,9 +188,9 @@ $button-transition-speed: $speed !default;
180188
&.is-hovered,
181189
&:focus,
182190
&.is-focused {
183-
// background-color: $button-background-primary;
184-
// border-color: $button-border-primary;
185-
// color: $button-text-primary;
191+
background-color: $button-background-invert;
192+
border-color: $button-border-invert;
193+
color: $button-text-invert;
186194

187195
.icon {
188196
fill: currentColor !important;
@@ -195,24 +203,40 @@ $button-transition-speed: $speed !default;
195203
}
196204

197205
&.is-borderless {
198-
background-color: $button-background-invert;
199-
border-color: transparent;
200-
color: $button-text-invert;
206+
&,
207+
&:active,
208+
&.is-active,
209+
&:hover,
210+
&.is-hovered,
211+
&:focus,
212+
&.is-focused {
213+
background-color: $button-background-invert;
214+
border-color: transparent;
215+
color: $button-text-invert;
201216

202-
.icon {
203-
fill: currentColor !important;
217+
.icon {
218+
fill: currentColor !important;
219+
}
204220
}
205221

206222
@extend .button-states;
207223
}
208224

209225
&.is-outlined {
210-
background-color: transparent;
211-
border-color: $button-text-primary;
212-
color: $button-text-primary;
226+
&,
227+
&:active,
228+
&.is-active,
229+
&:hover,
230+
&.is-hovered,
231+
&:focus,
232+
&.is-focused {
233+
background-color: transparent;
234+
border-color: $button-text-primary;
235+
color: $button-text-primary;
213236

214-
.icon {
215-
fill: currentColor !important;
237+
.icon {
238+
fill: currentColor !important;
239+
}
216240
}
217241

218242
@extend .button-states;

assets/styles/theme-kokemus.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $colors: (
4040
);
4141

4242
$button-colors: (
43-
"primary": ($primary, $color-white, $primary, $color-white),
43+
"primary": ($primary, $primary-invert, $primary, $primary-invert),
4444
"secondary": ($secondary, $secondary-invert, $secondary, $secondary-invert),
4545
);
4646

assets/styles/themes/_theme-kokemus-overrides.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
&:hover,
2828
&:focus {
2929
color: $primary-invert !important;
30-
background-color: $primary !important;
3130
}
3231
}
3332

@@ -120,10 +119,10 @@
120119

121120
&:hover,
122121
&:focus {
123-
color: $black !important;
122+
color: darken($primary, 70%) !important;
124123

125124
.icon {
126-
fill: $black !important;
125+
fill: darken($primary, 70%) !important;
127126
}
128127
}
129128
}

0 commit comments

Comments
 (0)