Skip to content

Forms: fix inconsistent weights in outline style and terms labels #43545

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

Open
wants to merge 6 commits into
base: update/migrate-form-fields-to-inner-blocks
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
11 changes: 6 additions & 5 deletions projects/packages/forms/src/blocks/contact-form/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,6 @@
.jetpack-field-checkbox,
.jetpack-field-consent {
display: flex;

.jetpack-field-label .jetpack-field-label__input {
font-weight: 400;
}
}

.jetpack-field-checkbox {
Expand All @@ -627,6 +623,7 @@
}

.jetpack-field-consent {
font-weight: 400;

:where(.wp-block-jetpack-option) {
font-size: 13px;
Expand Down Expand Up @@ -813,7 +810,7 @@
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
margin: 0;

:where( label, .jetpack-field-label__suffix ) {
.jetpack-field-label__suffix {
font-weight: 300;
}
}
Expand Down Expand Up @@ -1065,6 +1062,10 @@
font-weight: 700;
}

.is-style-outlined :where(.wp-block-jetpack-label) {
font-weight: 300;
}

.jetpack-field-dropdown__toggle .rich-text {
flex-grow: 1;
}
Expand Down
22 changes: 10 additions & 12 deletions projects/packages/forms/src/contact-form/css/grunion.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
font-weight: 700;
}

.grunion-checkbox-multiple-options :where( legend ),
.grunion-radio-options :where( legend ) {
margin-bottom: 0.25em;
padding: 0;
font-weight: 700;
}


.contact-form :where(label.consent) {
font-size: 13px;
font-weight: 400;
Expand Down Expand Up @@ -144,16 +152,6 @@
border: solid 1px var( --jetpack--contact-form--border-color );
}

.grunion-checkbox-multiple-options,
.grunion-radio-options {

:where( legend ) {
margin-bottom: 0.25em;
padding: 0;
font-weight: 700;
}
}

.contact-form .is-style-animated .grunion-checkbox-multiple-options legend,
.contact-form .is-style-animated .grunion-radio-options legend,
.contact-form .is-style-outlined .grunion-checkbox-multiple-options legend,
Expand Down Expand Up @@ -574,10 +572,10 @@ on production builds, the attributes are being reordered, causing side-effects
will-change: transform;
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
margin: 0;
font-weight: 300;
}

.contact-form .is-style-outlined .grunion-field-wrap legend.grunion-field-label {
.contact-form :where(.is-style-outlined .grunion-field-wrap .notched-label .notched-label__label),
.contact-form :where(.is-style-outlined .grunion-field-wrap legend.grunion-field-label) {
font-weight: 300;
}

Expand Down
Loading