Skip to content

Commit

Permalink
Reduce specificity of image rounded default style
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Apr 29, 2024
1 parent 208c24f commit bd5f422
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/block-library/src/image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@
@include caption-style();
}

// Variations
&.is-style-rounded img,
.is-style-rounded img {
// We use an absolute pixel to prevent the oval shape that a value of 50% would give
// to rectangular images. A pill-shape is better than otherwise.
border-radius: 9999px;
}

// The following variation is deprecated.
// The CSS is kept here for the time being, to support blocks using the old variation.
&.is-style-circle-mask img {
Expand Down Expand Up @@ -148,6 +140,13 @@
}
}

// Variations
:where(.wp-block-image.is-style-rounded img, .wp-block-image .is-style-rounded img) {
// We use an absolute pixel to prevent the oval shape that a value of 50% would give
// to rectangular images. A pill-shape is better than otherwise.
border-radius: 9999px;
}

.wp-block-image figure {
margin: 0;
}
Expand Down

0 comments on commit bd5f422

Please sign in to comment.