Skip to content

Commit

Permalink
Elements: lower specificity of elements block css (#41931)
Browse files Browse the repository at this point in the history
* lower specificity of elements css

* undo specificity change on elements rules

* moved default font size to styleshet instead of block.json
  • Loading branch information
MaggieCabrera committed Jun 24, 2022
1 parent 86ded7c commit fe7e962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 1 addition & 10 deletions packages/block-library/src/file/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,7 @@
},
"supports": {
"anchor": true,
"align": true,
"__experimentalStyle": {
"elements": {
"button": {
"typography": {
"fontSize": "0.8em"
}
}
}
}
"align": true
},
"viewScript": "file:./view.min.js",
"editorStyle": "wp-block-file-editor",
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/file/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.wp-block-file {
margin-bottom: 1.5em;

&:not(.wp-element-button) {
font-size: 0.8em;

This comment has been minimized.

Copy link
@Chrico

Chrico Jul 22, 2022

Contributor

The problem with this is, that it is assigned to the <div class="wp-block-file">, which will change the fontSize of the text as well. Wasn't the setting before in theme.json related to the button-Element and not to the text?

}

&.aligncenter {
text-align: center;
}
Expand Down

0 comments on commit fe7e962

Please sign in to comment.