Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 8a4105c

Browse files
Splaktarmmalerba
authored andcommitted
fix(radio-group): style focused but unchecked radio buttons (#11564)
better align with the MD spec Fixes #11563. Fixes #8339. Fixes #3643.
1 parent 8d965aa commit 8a4105c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/components/radioButton/radio-button-theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ md-radio-group.md-THEME_NAME-theme {
8989
}
9090
}
9191

92+
md-radio-group.md-THEME_NAME-theme.md-focused.ng-empty>md-radio-button:first-child {
93+
.md-container:before {
94+
background-color: '{{foreground-3-0.26}}';
95+
}
96+
}
97+
9298
md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) {
9399
.md-checked .md-container:before {
94100
background-color: '{{accent-color-0.26}}';

src/components/radioButton/radio-button.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,22 @@ md-radio-group {
149149
outline: none;
150150
}
151151

152-
&.md-focused {
152+
&.md-focused.ng-not-empty {
153153
.md-checked .md-container:before {
154154
left: -8px;
155155
top: -8px;
156156
right: -8px;
157157
bottom: -8px;
158158
}
159159
}
160+
&.md-focused.ng-empty>md-radio-button:first-child {
161+
.md-container:before {
162+
left: -8px;
163+
top: -8px;
164+
right: -8px;
165+
bottom: -8px;
166+
}
167+
}
160168

161169
&[disabled] md-radio-button {
162170
@include md-radio-button-disabled();

0 commit comments

Comments
 (0)