Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 83d1815

Browse files
vivekmarakanaamsheehan
authored andcommitted
fix(radio): Center align radio box (#538)
1 parent 891dc60 commit 83d1815

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

packages/mdc-checkbox/mdc-checkbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
display: inline-block;
5151
position: relative;
5252
box-sizing: content-box;
53+
flex: 0 0 $mdc-checkbox-size;
5354
width: $mdc-checkbox-size;
5455
height: $mdc-checkbox-size;
55-
flex: 0 0 $mdc-checkbox-size;
5656
padding: ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2;
5757
line-height: 0;
5858
white-space: nowrap;

packages/mdc-radio/mdc-radio.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ $mdc-radio-transition-duration: 120ms;
4040
display: inline-block;
4141
position: relative;
4242
box-sizing: border-box;
43+
flex: 0 0 $mdc-radio-touch-area;
4344
width: $mdc-radio-touch-area;
4445
height: $mdc-radio-touch-area;
45-
flex: 0 0 $mdc-radio-touch-area;
4646
padding: ($mdc-radio-touch-area - $mdc-radio-ui-size) / 2;
4747
cursor: pointer;
4848
will-change: opacity, transform, border-color, background-color, color;
@@ -67,6 +67,7 @@ $mdc-radio-transition-duration: 120ms;
6767
&__background {
6868
display: inline-block;
6969
position: absolute;
70+
left: ($mdc-radio-touch-area - $mdc-radio-ui-size) / 2;
7071
width: $mdc-radio-ui-pct;
7172
height: $mdc-radio-ui-pct;
7273
box-sizing: border-box;

packages/mdc-toolbar/mdc-toolbar.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ $mdc-toolbar-mobile-breakpoint: 599px;
5858
flex: 1;
5959
align-items: flex-start;
6060
justify-content: center;
61-
z-index: 1;
6261
overflow: hidden;
62+
z-index: 1;
6363

6464
&--align-start {
6565
justify-content: flex-start;
@@ -75,11 +75,11 @@ $mdc-toolbar-mobile-breakpoint: 599px;
7575
&__title {
7676
@include mdc-typography(title);
7777

78-
overflow: hidden;
79-
text-overflow: ellipsis;
80-
white-space: nowrap;
8178
margin: 0;
8279
line-height: 1.5rem;
80+
text-overflow: ellipsis;
81+
white-space: nowrap;
82+
overflow: hidden;
8383
}
8484
}
8585

0 commit comments

Comments
 (0)