Skip to content

Commit 8c51e19

Browse files
committed
fix: fix browser bug in Safari when content overflows due to the border-radius value set.
1 parent df1daf8 commit 8c51e19

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/_patterns/02-components/bolt-blockquote/src/blockquote.scss

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ bolt-blockquote {
7575
.c-bolt-blockquote {
7676
@include bolt-margin(0);
7777

78-
&:before, &:after {
78+
&:before,
79+
&:after {
7980
width: 100%;
80-
max-width: 300px;
8181
height: $bolt-blockquote-border-width;
82+
max-width: 300px;
8283
content: '';
8384
vertical-align: top;
8485
background-color: $bolt-blockquote-border-color;
@@ -110,7 +111,8 @@ bolt-blockquote {
110111
color: inherit;
111112
color: var(--bolt-theme-heading, inherit);
112113

113-
p:first-child:before, p:last-child:after {
114+
p:first-child:before,
115+
p:last-child:after {
114116
font-family: 'Georgia', serif; // TODO: Replace with Noto Serif when it is added.
115117
}
116118

@@ -124,15 +126,22 @@ bolt-blockquote {
124126
}
125127

126128

129+
/**
130+
* 1. Workaround to address weird Safari bug w/ overflow + border radius
131+
* https://gist.github.com/adamcbrewer/5859738#gistcomment-2008691
132+
*/
133+
127134
// Attribution
128135
.c-bolt-blockquote__image {
129136
display: inline-block;
137+
position: relative; /* [1] */
138+
z-index: 1; /* [1] */
130139
width: $bolt-blockquote-image-size;
131140
height: $bolt-blockquote-image-size;
132141
border-width: $bolt-blockquote-image-border-width;
133142
border-style: $bolt-blockquote-image-border-style;
134143
border-color: $bolt-blockquote-image-border-color;
135-
border-radius: 100em;
144+
border-radius: 50%;
136145
overflow: hidden;
137146
}
138147

0 commit comments

Comments
 (0)