Skip to content

Commit

Permalink
Styles specificity: allow comment form input overrides (#62960)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
  • Loading branch information
4 people authored and gutenbergplugin committed Jul 9, 2024
1 parent 4ded8fb commit d995412
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions packages/block-library/src/post-comments-form/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Allow these default styles to be overridden by global styles.
:where(.wp-block-post-comments-form) {
textarea,
input:not([type="submit"]) {
border: 1px solid $gray-600;
font-size: 1em;
font-family: inherit;
}

textarea,
input:where(:not([type="submit"]):not([type="checkbox"])) {
padding: calc(0.667em + 2px); // The extra 2px is added to match outline buttons.
}
}

.wp-block-post-comments-form {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
Expand Down Expand Up @@ -31,18 +46,6 @@
overflow-wrap: break-word;
}

textarea,
input:not([type="submit"]) {
border: 1px solid $gray-600;
font-size: 1em;
font-family: inherit;
}

textarea,
input:not([type="submit"]):not([type="checkbox"]) {
padding: calc(0.667em + 2px); // The extra 2px is added to match outline buttons.
}

.comment-form {
textarea,
// Make sure to not set display block on hidden input fields, to prevent
Expand Down

0 comments on commit d995412

Please sign in to comment.