Skip to content

Commit eb52cc6

Browse files
committed
fix: fix button group styling in Safari/iOS
1 parent e6a1ef5 commit eb52cc6

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

packages/button/_mixins.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
.smui-button__group {
3838
display: inline-flex;
3939

40+
& > .mdc-button,
41+
& > .smui-button__group-item > .mdc-button {
42+
margin-left: 0;
43+
margin-right: 0;
44+
}
45+
4046
& > .mdc-button:not(:last-child),
4147
& > .smui-button__group-item:not(:last-child) > .mdc-button {
4248
border-top-right-radius: 0;
@@ -66,6 +72,7 @@
6672
}
6773

6874
@mixin smui-button__group-mdc-button--raised_($query) {
75+
@include mdc-button-shape-radius(small, $query: $query);
6976
@include mdc-elevation(0, $query: $query);
7077

7178
&:hover,

site/src/routes/demo/button.scss

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99
--notchSize: #{$mdc-shape-small-component-radius * 2};
1010

1111
// source: https://css-tricks.com/notched-boxes/
12-
clip-path:
13-
polygon(
14-
0% var(--notchSize),
15-
var(--notchSize) 0%,
16-
calc(100% - var(--notchSize)) 0%,
17-
100% var(--notchSize),
18-
100% calc(100% - var(--notchSize)),
19-
calc(100% - var(--notchSize)) 100%,
20-
var(--notchSize) 100%,
21-
0% calc(100% - var(--notchSize))
22-
);
12+
-webkit-clip-path: polygon(0% var(--notchSize), var(--notchSize) 0%, calc(100% - var(--notchSize)) 0%, 100% var(--notchSize), 100% calc(100% - var(--notchSize)), calc(100% - var(--notchSize)) 100%, var(--notchSize) 100%, 0% calc(100% - var(--notchSize)));
13+
clip-path: polygon(0% var(--notchSize), var(--notchSize) 0%, calc(100% - var(--notchSize)) 0%, 100% var(--notchSize), 100% calc(100% - var(--notchSize)), calc(100% - var(--notchSize)) 100%, var(--notchSize) 100%, 0% calc(100% - var(--notchSize)));
2314
}

0 commit comments

Comments
 (0)