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

Styles specificity: allow comment form input overrides #62960

Merged
merged 2 commits into from
Jul 9, 2024
Merged
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
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
Loading