diff --git a/packages/block-library/src/file/style.scss b/packages/block-library/src/file/style.scss index 1e9b86588c885..bba0f5e165ce7 100644 --- a/packages/block-library/src/file/style.scss +++ b/packages/block-library/src/file/style.scss @@ -10,19 +10,24 @@ text-align: right; } - .wp-block-file__embed { - margin-bottom: 1em; + * + .wp-block-file__button { + margin-left: 0.75em; } +} - .wp-block-file__button { - background: #32373c; - border-radius: 2em; - color: $white; - font-size: 0.8em; - padding: 0.5em 1em; - } +.wp-block-file__embed { + margin-bottom: 1em; +} - a.wp-block-file__button { +//This needs a low specificity so it won't override the rules from the button element if defined in theme.json. +.wp-block-file__button { + background: #32373c; + border-radius: 2em; + color: $white; + font-size: 0.8em; + padding: 0.5em 1em; + + &:is(a) { text-decoration: none; &:hover, @@ -35,8 +40,4 @@ text-decoration: none; } } - - * + .wp-block-file__button { - margin-left: 0.75em; - } } diff --git a/packages/block-library/src/search/style.scss b/packages/block-library/src/search/style.scss index da8ca3e866aa8..d6b54065e41d9 100644 --- a/packages/block-library/src/search/style.scss +++ b/packages/block-library/src/search/style.scss @@ -47,7 +47,8 @@ } } -.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { +// We are lowering the specificity so that the button element can override the rule for the button inside the search block. +:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) { padding: 4px; border: 1px solid #949494;