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

Adds in basic styling for post comment form #35704

Merged
merged 5 commits into from
Oct 22, 2021
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
54 changes: 47 additions & 7 deletions packages/block-library/src/post-comments-form/style.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
// Styles copied from button block styles.
.wp-block-post-comments-form input[type="submit"] {
border: none;
box-shadow: none;
cursor: pointer;
display: inline-block;
text-align: center;
overflow-wrap: break-word;
.wp-block-post-comments-form {

input[type="submit"] {
border: none;
box-shadow: none;
cursor: pointer;
display: inline-block;
text-align: center;
overflow-wrap: break-word;
}

textarea,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we let the font-family: inherit; for this textarea?

Screen Shot 2021-10-21 at 10 09 46 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops — I missed that originally. Should be all set as of 4881e18.

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-comment textarea {
display: block;
box-sizing: border-box;
width: 100%;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
label {
display: block;
margin-bottom: 0.25em;
}
}

.comment-form-cookies-consent {
display: flex;
gap: 0.25em;

#wp-comment-cookies-consent {
margin-top: 0.35em;
}
}
}
23 changes: 22 additions & 1 deletion packages/block-library/src/post-comments/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
.comment-form-url {
label {
display: block;
margin-bottom: 0.25em;
}
}

Expand All @@ -63,13 +64,33 @@
width: 100%;
}

.comment-form-cookies-consent {
display: flex;
gap: 0.25em;

#wp-comment-cookies-consent {
margin-top: 0.35em;
}
}

.reply {
font-size: 0.75em;
margin-bottom: 1.4em;
}

textarea,
input {
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.
}

input[type="submit"] {
border: none;
}
}