Skip to content

Commit 5b4a9ff

Browse files
committed
fix: rounded corners on shadow of accordion panels
1 parent 3d11ef1 commit 5b4a9ff

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

packages/accordion/_mixins.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@use '@material/feature-targeting/index' as feature-targeting;
66
@use '@material/typography/index' as typography;
77
@use '@material/ripple/ripple' as ripple;
8+
@use '@smui/paper/mixins' as paper;
89

910
$ripple-target: '.smui-accordion__header__ripple';
1011
$panel-padding: 16px 24px !default;
@@ -134,16 +135,24 @@ $divider-color-on-dark-bg: rgba(255, 255, 255, 0.2) !default;
134135
}
135136
}
136137

138+
// Round the corners of the shadow pseudo-element too.
139+
&.smui-paper--rounded::before {
140+
@include paper.shape-radius(medium, $query: $query);
141+
}
142+
137143
// Square off the corners of all but the first and last panels.
138-
&:first-child:not(:last-child) {
144+
&:first-child:not(:last-child),
145+
&:first-child:not(:last-child)::before {
139146
border-bottom-left-radius: 0;
140147
border-bottom-right-radius: 0;
141148
}
142-
&:last-child:not(:first-child) {
149+
&:last-child:not(:first-child),
150+
&:last-child:not(:first-child)::before {
143151
border-top-left-radius: 0;
144152
border-top-right-radius: 0;
145153
}
146-
&:not(:first-child, :last-child) {
154+
&:not(:first-child, :last-child),
155+
&:not(:first-child, :last-child)::before {
147156
border-radius: 0;
148157
}
149158

0 commit comments

Comments
 (0)