Skip to content

Commit

Permalink
Forms: fix Single and Multiple Choice fields view styles (#39473)
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieur-z authored Sep 24, 2024
1 parent 920c82c commit f103fa7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions projects/packages/forms/changelog/fix-choice-fields-styles
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Single and Multiple Choice fields: fix view styles


6 changes: 4 additions & 2 deletions projects/packages/forms/src/blocks/contact-form/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
border-radius: var(--jetpack--contact-form--button-outline--border-radius);
padding: var(--jetpack--contact-form--button-outline--padding);
line-height: var(--jetpack--contact-form--button-outline--line-height);
align-items: center;

&.field-option-radio {
position: relative;
Expand Down Expand Up @@ -470,8 +471,9 @@
}
}

.jetpack-field-option {
&.field-option-radio .jetpack-option__type {
.jetpack-field-option.field-option-radio,
.wp-block-jetpack-field-option-radio {
.jetpack-option__type {
transform: translateY(15%); /* Small offset to compensate the slightly odd perceived alignment that's due to the circular shape */
}
}
Expand Down
3 changes: 2 additions & 1 deletion projects/packages/forms/src/contact-form/css/grunion.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
.contact-form input[type='checkbox'] {
top: 0;
margin-left: 0;
border-radius: 4px;
}

.contact-form label {
Expand Down Expand Up @@ -580,7 +581,7 @@ on production builds, the attributes are being reordered, causing side-effects
padding: 0;

appearance: none;
border: solid 1px var(--jetpack--contact-form--text-color);
border: solid 1px currentColor;

outline-offset: 4px;
}
Expand Down

0 comments on commit f103fa7

Please sign in to comment.