Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File, Search Blocks: Lower CSS specificity #41393

Merged
merged 5 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions packages/block-library/src/file/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -35,8 +40,4 @@
text-decoration: none;
}
}

* + .wp-block-file__button {
margin-left: 0.75em;
}
}
3 changes: 2 additions & 1 deletion packages/block-library/src/search/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down