Skip to content
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
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 @@ -613,10 +613,6 @@
.jetpack-field-checkbox,
.jetpack-field-consent {
display: flex;

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

.jetpack-field-checkbox {
Expand All @@ -628,6 +624,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 @@ -1078,6 +1075,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;
Copy link
Contributor

Choose a reason for hiding this comment

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

not introduced here, but I've also seen this 700 font weight, and have been wondering what it's for.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking at trunk it seems to be the default weight for labels (and legends in options blocks)

https://github.com/Automattic/jetpack/blob/trunk/projects/packages/forms/src/contact-form/css/grunion.css#L85

At least in the frontend 😄

Thanks for testing!

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yes, when using the default style variation. I'm too focused on outlined styles!

}


.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 @@ -577,7 +575,6 @@ on production builds, the attributes are being reordered, causing side-effects
pointer-events: none;
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
margin: 0;
font-weight: 300;
}

.contact-form .is-style-outlined .grunion-field-wrap .notched-label .grunion-label-text {
Expand All @@ -590,7 +587,8 @@ on production builds, the attributes are being reordered, causing side-effects
transition: font-size 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.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