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

PLANET-7660: Fix checkbox mark alignement #2441

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions assets/src/scss/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ $large-width: 992px;
$extra-large-width: 1200px;
$extra-extra-large-width: 1600px;

// Override html selectors
$checkbox-size: 20px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using this value as variable since it's being used in both files. It will avoid to hve conflict with sizes.


// Spacing
@function space($base) {
@return $base * 8px;
Expand Down
8 changes: 4 additions & 4 deletions assets/src/scss/layout/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

&:before {
content: "";
width: 20px;
height: 20px;
width: $checkbox-size;
height: $checkbox-size;
background: var(--white);
border: 1px solid var(--grey-500);
border-radius: 2px;
Expand All @@ -62,8 +62,8 @@
transform: rotate(-45deg) scale(-1, 1);
border-bottom: 2px solid var(--grey-900);
border-right: 2px solid var(--grey-900);
top: calc(((100% - $sp-2x) / 2) + 5px);
left: $sp-x;
top: calc($checkbox-size / 2);
left: calc($checkbox-size / 2 - $sp-1x / 2);
height: 8px;
width: 12px;

Expand Down
5 changes: 4 additions & 1 deletion assets/src/scss/pages/post/_comments-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@
font-family: var(--font-family-primary);
}
margin-bottom: 8px;
position: relative;

#gdpr-comments-checkbox {
display: inline-block;
margin-inline-end: 8px;
width: inherit;
width: $checkbox-size !important;
height: $checkbox-size;
top: calc($sp-1 - 1px);
}

#gdpr-comments-label {
Expand Down