Skip to content

Commit

Permalink
Styles specificity: allow comment form input overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 28, 2024
1 parent ea72cf1 commit a90f2eb
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: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 a90f2eb

Please sign in to comment.