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

#5894: Blockbase: Fix comment subscription checkboxes #6140

Closed
wants to merge 1 commit into from
Closed
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
48 changes: 37 additions & 11 deletions blockbase/sass/blocks/_post-comments.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.wp-block-post-comments {
label, .comment-meta {

label,
.comment-meta {
font-size: var(--wp--custom--form--label--typography--font-size);
}

Expand All @@ -10,6 +12,7 @@
a {
display: inline-block;
text-decoration: underline;

&:hover {
text-decoration: none;
}
Expand All @@ -21,15 +24,16 @@
column-gap: 1em;
grid-template-rows: auto;
grid-template-areas:
"misc misc"
"loggedin loggedin"
"misc1 misc2"
"notes notes"
"author author"
"email url"
"comment comment"
"cookies-consent cookies-consent"
"form-submit form-submit";

input:not([type=submit]):not([type=checkbox]),
input:not([type="submit"]):not([type="checkbox"]),
textarea {
font-size: var(--wp--custom--font-sizes--normal);
background: var(--wp--custom--color--background);
Expand All @@ -41,7 +45,7 @@
vertical-align: top;
}

label:not([for=wp-comment-cookies-consent]) {
label:not([for="wp-comment-cookies-consent"]) {
font-size: var(--wp--custom--form--label--typography--font-size);
font-weight: var(--wp--custom--form--label--typography--font-weight);
letter-spacing: var(--wp--custom--form--label--typography--letter-spacing);
Expand All @@ -53,8 +57,21 @@
margin-top: 0;
margin-bottom: var(--wp--custom--gap--vertical);
}

& > * {
grid-area: misc;
grid-area: unset;
}

.logged-in-as {
grid-area: loggedin;
}

.comment-subscription-form {
grid-area: misc1;
}

.comment-subscription-form ~ p.comment-subscription-form {
grid-area: misc2;
}

.comment-notes {
Expand Down Expand Up @@ -86,20 +103,25 @@
}

.comment-form-cookies-consent {

input[type="checkbox"] {

@include hide-accesibly;
margin-left: 0;

& + label {
display: inline-block;
line-height: calc( var(--wp--custom--form--checkbox--unchecked--sizing--height) + 2 * var(--wp--custom--form--border--width));
line-height: calc(var(--wp--custom--form--checkbox--unchecked--sizing--height) + 2 * var(--wp--custom--form--border--width));
margin-left: 0;
padding-left: calc( var(--wp--custom--form--checkbox--unchecked--sizing--width) + ( var(--wp--custom--gap--baseline) / 1.5 ) );
padding-left: calc(var(--wp--custom--form--checkbox--unchecked--sizing--width) + ( var(--wp--custom--gap--baseline) / 1.5 ));
position: relative;
}

& + label::before,
& + label::after {
box-sizing: border-box;
}

& + ::before {
content: var(--wp--custom--form--checkbox--unchecked--content);
position: absolute;
Expand All @@ -109,8 +131,9 @@
height: var(--wp--custom--form--checkbox--unchecked--sizing--height);
border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color);
}

&:checked + ::after {
content: var(--wp--custom--form--checkbox--checked--content);;
content: var(--wp--custom--form--checkbox--checked--content);
position: absolute;
top: var(--wp--custom--form--checkbox--checked--position--top);
left: var(--wp--custom--form--checkbox--checked--position--left);
Expand All @@ -120,14 +143,15 @@
}

&:focus + ::before {
outline: 1px dotted currentColor;
outline: 1px dotted currentcolor;
outline-offset: 2px;
}
}
}
}

.comment-reply-title {

small {
float: right;
font-size: 14px;
Expand All @@ -136,7 +160,9 @@

.commentlist {
margin-bottom: calc(2 * var(--wp--style--block-gap));

.comment {

p {
font-size: var(--wp--custom--post-comment--typography--font-size);
line-height: var(--wp--custom--post-comment--typography--line-height);
Expand All @@ -147,12 +173,12 @@
}

.comment-body {
margin-bottom: calc(1.5 * var( --wp--style--block-gap ));
margin-bottom: calc(1.5 * var(--wp--style--block-gap));
}

.commentmetadata {
margin-left: 0;
margin-bottom: calc(0.75 * var( --wp--style--block-gap ));
margin-bottom: calc(0.75 * var(--wp--style--block-gap));
}

.comment-awaiting-moderation {
Expand Down