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

Forms: fix Single and Multiple Choice fields view styles #39473

Merged
merged 1 commit into from
Sep 24, 2024
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
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;
Copy link
Contributor Author

@monsieur-z monsieur-z Sep 19, 2024

Choose a reason for hiding this comment

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

Align items in the center in Button mode so the padding looks similar at the top and bottom.


&.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 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Selector needs to be updated because of #39141

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
Loading