Skip to content

Commit

Permalink
Fix border-radius inheritance by avatar image.
Browse files Browse the repository at this point in the history
Addition of `:root` specificity in Core/Gutenberg seems to be overwriting this. See: WordPress/gutenberg#61638
  • Loading branch information
justintadlock committed Jun 9, 2024
1 parent f816d1d commit 5434ed7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/css/blocks/core/avatar.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'e23a2b6e1727cc51a94e');
<?php return array('dependencies' => array(), 'version' => 'b5db192c873cf02cdf6a');
2 changes: 1 addition & 1 deletion public/css/blocks/core/avatar.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion resources/scss/blocks/core/avatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
/// wrapper via the Selectors API in PHP so that links can inherit the radius
/// from the wrapper.
///
/// Gutenberg 18.5 (WP 6.6 cycle) overwrote this with its global styles specificity
/// changes (addition of `:root`), so we needed to add the `!important`.
/// @link https://github.com/WordPress/gutenberg/pull/61638
///
.wp-block-avatar > *,
.wp-block-avatar__image,
.wp-block-avatar__link {
border-radius: inherit;
border-radius: inherit !important;
}

// Ensures the `border-radius` applies.
Expand Down

0 comments on commit 5434ed7

Please sign in to comment.