Skip to content

Commit c618a6f

Browse files
refactor(hx-choicetile): update component specs
1 parent 6075de7 commit c618a6f

File tree

2 files changed

+62
-14
lines changed

2 files changed

+62
-14
lines changed

src/scss/components/choice-tile/_index.scss

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ hx-tile {
1818
font-size: 1rem;
1919
font-weight: 700;
2020
margin-bottom: 0;
21+
color: $gray-700;
22+
line-height: 24px;
23+
text-align: center;
2124
}
2225

2326
> p {
2427
font-size: 0.75rem;
28+
color: $gray-700;
2529
}
2630

2731
&.hxSm {
@@ -115,7 +119,7 @@ label.hxChoice > input + hx-tile {
115119
cursor: pointer;
116120

117121
.hx-tile-icon {
118-
color: $gray-700;
122+
color: $gray-400;
119123
}
120124
}
121125

@@ -130,15 +134,23 @@ label.hxChoice > input:focus + hx-tile {
130134

131135
// ========== CHECKED ==========
132136
label.hxChoice > input:checked + hx-tile {
133-
border-color: $cyan-900;
134-
color: $cyan-900;
137+
border: 1px solid $purple-300;
138+
color: $gray-0;
139+
140+
> hx-icon {
141+
color: $purple-300;
142+
}
135143

136144
.hx-tile-icon {
137-
color: $cyan-900;
145+
color: $purple-300;
146+
}
147+
148+
> header {
149+
color: $purple-300;
138150
}
139151

140152
> p {
141-
color: $gray-900;
153+
color: $gray-950;
142154
}
143155

144156
// DEPRECATED: remove in v1.0.0
@@ -163,6 +175,14 @@ label.hxChoice > input[invalid] + hx-tile {
163175
.hx-tile-icon {
164176
color: inherit;
165177
}
178+
179+
> header {
180+
color: inherit;
181+
}
182+
183+
hx-icon[type="checkmark"] {
184+
color: inherit;
185+
}
166186
}
167187

168188
label.hxChoice > input[invalid] + hx-tile:hover {
@@ -179,17 +199,21 @@ label.hxChoice > input[disabled] + hx-tile:hover {
179199
@include hxChoiceTile--disabled;
180200

181201
> p {
182-
color: inherit;
202+
color: $gray-500;
183203
}
184204

185205
// DEPRECATED: remove in v1.0.0
186206
hx-tile-description {
187-
color: inherit;
207+
color: $gray-500;
188208
}
189209

190-
hx-icon {
210+
> header {
191211
color: $gray-500;
192212
}
213+
214+
hx-icon {
215+
color: $gray-400;
216+
}
193217
}
194218

195219
// DEPRECATED: remove in v1.0.0

src/scss/components/choice-tile/mixins/_hxChoiceTile.scss

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@
55
// ========== Default ==========
66
@mixin hxChoiceTile($pseudo-state: null) {
77
@if $pseudo-state == focus {
8-
box-shadow: $focus-glow;
8+
box-shadow: 0 0 4px rgba($purple-700, 0.5);
99
}
1010
@else if $pseudo-state == hover {
11-
background-color: $cyan-50;
12-
border-color: $cyan-500;
11+
background-color: $gray-0;
12+
border: 1px solid $purple-700;
13+
14+
> header {
15+
color: $purple-700;
16+
}
17+
18+
> p {
19+
color: $gray-950;
20+
}
21+
22+
.hx-tile-icon {
23+
color: $purple-700;
24+
}
1325
}
1426
}
1527

@@ -32,19 +44,31 @@
3244
background-color: $red-100;
3345
border-color: $red-900;
3446
color: $gray-900;
47+
48+
> header {
49+
color: inherit;
50+
}
3551
}
3652
@else {
3753
border-color: $red-900;
3854
border-width: 2px;
3955
color: $red-900;
4056
}
57+
58+
.hx-tile-icon {
59+
color: $red-900;
60+
}
4161
}
4262

4363
// ========== Disabled ==========
4464
@mixin hxChoiceTile--disabled {
45-
background-color: $gray-25;
46-
border-color: $gray-300;
65+
background-color: $gray-0;
66+
border-color: $gray-400;
4767
border-width: 1px;
48-
color: $gray-700;
68+
color: $gray-500;
4969
cursor: not-allowed;
70+
71+
> header {
72+
color: inherit;
73+
}
5074
}

0 commit comments

Comments
 (0)