Skip to content

Commit bd5f422

Browse files
Reduce specificity of image rounded default style
1 parent 208c24f commit bd5f422

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/block-library/src/image/style.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@
8282
@include caption-style();
8383
}
8484

85-
// Variations
86-
&.is-style-rounded img,
87-
.is-style-rounded img {
88-
// We use an absolute pixel to prevent the oval shape that a value of 50% would give
89-
// to rectangular images. A pill-shape is better than otherwise.
90-
border-radius: 9999px;
91-
}
92-
9385
// The following variation is deprecated.
9486
// The CSS is kept here for the time being, to support blocks using the old variation.
9587
&.is-style-circle-mask img {
@@ -148,6 +140,13 @@
148140
}
149141
}
150142

143+
// Variations
144+
:where(.wp-block-image.is-style-rounded img, .wp-block-image .is-style-rounded img) {
145+
// We use an absolute pixel to prevent the oval shape that a value of 50% would give
146+
// to rectangular images. A pill-shape is better than otherwise.
147+
border-radius: 9999px;
148+
}
149+
151150
.wp-block-image figure {
152151
margin: 0;
153152
}

0 commit comments

Comments
 (0)