|
1 | | -$theme-input-tile-background-color: 'transparent'; // https://github.com/uswds/uswds/pull/4199 |
2 | | -$theme-input-bordered-background-color: $theme-input-tile-background-color; |
| 1 | +$theme-input-tile-background-color-selected: 'primary-lightest'; |
| 2 | +$theme-input-tile-border-color: 'primary-light'; |
| 3 | +$theme-input-tile-border-color-selected: 'primary-light'; |
3 | 4 | $theme-input-bordered-background-color-selected: $theme-input-tile-background-color-selected; |
4 | 5 | $theme-input-bordered-border-radius: $theme-input-tile-border-radius; |
5 | 6 | $theme-input-bordered-border-width: $theme-input-tile-border-width; |
@@ -75,27 +76,21 @@ $input-select-margin-right: 1; |
75 | 76 |
|
76 | 77 | .usa-radio__label, |
77 | 78 | .usa-checkbox__label { |
78 | | - @extend %block-input-general; |
79 | 79 | display: inline-block; |
80 | 80 | margin-bottom: units(1); |
81 | 81 | padding-left: $checkbox-radio-size + units($input-select-margin-right); |
82 | | - text-indent: 0; |
83 | 82 |
|
84 | 83 | &::before { |
85 | 84 | background-color: color('primary-lightest'); |
86 | 85 | box-shadow: inset 0 0 0 units($border-width) color('primary'); |
87 | | - display: block; |
88 | 86 | height: $checkbox-radio-size; |
89 | | - left: 0; |
90 | 87 | margin-left: 0; |
91 | 88 | margin-right: 0; |
92 | 89 | margin-top: ( |
93 | 90 | line-height($theme-form-font-family, $theme-input-line-height) * |
94 | 91 | font-size($theme-form-font-family, $theme-body-font-size) - |
95 | 92 | $checkbox-radio-size |
96 | 93 | ) / 2; |
97 | | - position: absolute; |
98 | | - white-space: normal; |
99 | 94 | width: $checkbox-radio-size; |
100 | 95 | } |
101 | 96 | } |
@@ -160,34 +155,39 @@ $input-select-margin-right: 1; |
160 | 155 | .usa-radio__input--tile + .usa-radio__label { |
161 | 156 | @include u-text('primary', 'bold'); |
162 | 157 | @include u-display('block'); |
163 | | - background-color: color($theme-input-tile-background-color); // https://github.com/uswds/uswds/pull/4178 |
| 158 | + border-color: color($theme-input-tile-border-color); |
164 | 159 | max-width: units($theme-input-max-width); |
165 | 160 | } |
166 | 161 |
|
167 | 162 | .usa-radio__input--bordered + .usa-radio__label, |
168 | 163 | .usa-checkbox__input--bordered + .usa-checkbox__label { |
169 | 164 | @include u-display('table'); // Margin collapse of a "block" while retaining collapsed width. |
170 | | - background-color: color($theme-input-bordered-background-color); |
171 | 165 | border: units($theme-input-bordered-border-width) solid color($theme-input-bordered-border-color); |
172 | 166 | border-radius: radius($theme-input-bordered-border-radius); |
173 | 167 | margin: units(1) 0; |
174 | 168 | max-width: units($theme-input-max-width); |
175 | 169 | padding: units(1) units(2) units(1) #{units(2) + $checkbox-radio-size + units($input-select-margin-right)}; |
176 | 170 | } |
177 | 171 |
|
| 172 | +.usa-radio__input--bordered:checked + .usa-radio__label, |
| 173 | +.usa-checkbox__input--bordered:checked + .usa-checkbox__label { |
| 174 | + background-color: color($theme-input-bordered-background-color-selected); |
| 175 | + border-color: color($theme-input-bordered-border-color-selected); |
| 176 | +} |
| 177 | + |
| 178 | +.usa-checkbox__input--tile:checked + .usa-checkbox__label, |
| 179 | +.usa-radio__input--tile:checked + .usa-radio__label { |
| 180 | + background-color: color($theme-input-tile-background-color-selected); |
| 181 | + border-color: color($theme-input-tile-border-color-selected); |
| 182 | +} |
| 183 | + |
178 | 184 | .usa-checkbox__input--tile + .usa-checkbox__label::before, |
179 | 185 | .usa-radio__input--tile + .usa-radio__label::before, |
180 | 186 | .usa-radio__input--bordered + .usa-radio__label::before, |
181 | 187 | .usa-checkbox__input--bordered + .usa-checkbox__label::before { |
182 | 188 | left: units(2); |
183 | 189 | } |
184 | 190 |
|
185 | | -.usa-checkbox__input--bordered:checked + .usa-checkbox__label, |
186 | | -.usa-radio__input--bordered:checked + .usa-radio__label { |
187 | | - background-color: color($theme-input-bordered-background-color-selected); |
188 | | - border-color: color($theme-input-bordered-border-color-selected); |
189 | | -} |
190 | | - |
191 | 191 | .usa-checkbox__label-description, |
192 | 192 | .usa-radio__label-description { |
193 | 193 | @include typeset( |
|
0 commit comments