Skip to content

Commit

Permalink
Theme: Fix accessibly typo
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Nov 10, 2021
1 parent d123826 commit bc29e13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Hide an element accesibly instead of using display: none;
// Hide an element accessibly instead of using display: none;
// Source: https://github.com/WordPress/gutenberg/blob/3da717b8d0ac7d7821fc6d0475695ccf3ae2829f/packages/block-editor/src/components/responsive-block-control/style.scss#L1
@mixin hide-accesibly {
@mixin hide-accessibly {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,21 @@

.comment-form-cookies-consent {
input[type="checkbox"] {
@include hide-accesibly;
@include hide-accessibly;

margin-left: 0;

& + label {
margin-left: 0;
padding-left: 3em;
position: relative;
}

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

& + ::before {
content: var(--wp--custom--form--checkbox--unchecked--content);
position: absolute;
Expand All @@ -93,6 +97,7 @@
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);;
position: absolute;
Expand Down

0 comments on commit bc29e13

Please sign in to comment.