Skip to content

Commit

Permalink
Forms: Fix block style variations not appearing in the editor (#41457)
Browse files Browse the repository at this point in the history
* Fix form style variations not displaying in editor

* changelog

* Fix outlined style for single and multiple choice fields
  • Loading branch information
talldan authored Feb 6, 2025
1 parent 292760c commit 7f8563c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Forms: Fix block style variations not showing in the editor.
8 changes: 4 additions & 4 deletions projects/packages/forms/src/blocks/contact-form/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -711,13 +711,13 @@
}
}

&.is-style-outlined, &.is-style-animated {
.is-style-outlined &, .is-style-animated & {
.jetpack-field {
position: relative;
}
}

&.is-style-outlined {
.is-style-outlined & {
.block-editor-block-list__block:not([contenteditable]):focus:after {
top: -10px;
left: -10px;
Expand All @@ -728,7 +728,7 @@
.jetpack-field {
--notch-width: max(var(--jetpack--contact-form--input-padding-left, 16px), var(--jetpack--contact-form--border-radius));
margin-top: 8px;
display: flex;
box-sizing: border-box;

.notched-label {
position: absolute;
Expand Down Expand Up @@ -869,7 +869,7 @@
}
}

&.is-style-animated {
.is-style-animated & {
.jetpack-field {
--left-offset: calc(var(--jetpack--contact-form--input-padding-left, 16px) + var(--jetpack--contact-form--border-size));
--label-left: max(var(--left-offset), var(--jetpack--contact-form--border-radius));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Forms: Fix block style variations not showing in the editor.

0 comments on commit 7f8563c

Please sign in to comment.