Skip to content

Commit 9efe006

Browse files
committed
make core buttons take the same styles as previous jetpack buttons
1 parent f4317ce commit 9efe006

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

projects/packages/forms/src/blocks/contact-form/editor.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
margin-bottom: 0;
6262
max-width: 100%;
6363

64+
&.wp-block-button,
6465
&.wp-block-jetpack-button {
6566
flex: 0 0 auto;
6667
min-height: var(--jetpack--contact-form--input-height, auto);
@@ -87,6 +88,7 @@
8788
box-sizing: border-box;
8889
}
8990

91+
&.wp-block-button__width-25,
9092
&.jetpack-field__width-25 {
9193
flex: 1 1 calc(25% - calc(var(--wp--style--block-gap, 1.5rem) * 1));
9294
max-width: 25%;
@@ -97,16 +99,30 @@
9799
max-width: 33.33%;
98100
}
99101

102+
&.wp-block-button__width-50,
100103
&.jetpack-field__width-50 {
101104
flex: 1 1 calc(50% - calc(var(--wp--style--block-gap, 1.5rem) * 1));
102105
max-width: 50%;
103106
}
104107

108+
&.wp-block-button__width-75,
105109
&.jetpack-field__width-75 {
106110
flex: 1 1 calc(75% - calc(var(--wp--style--block-gap, 1.5rem) * 1));
107111
max-width: 75%;
108112
}
109113

114+
&.wp-block-button__width-100 {
115+
flex: 1 1 100%;
116+
max-width: 100%;
117+
}
118+
119+
&.wp-block-button.has-custom-width {
120+
121+
.wp-block-button__link {
122+
width: 100%;
123+
}
124+
}
125+
110126
&.jetpack-field__width-auto {
111127
flex: 1 1 0;
112128
}

projects/packages/forms/src/contact-form/css/grunion.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ that needs to mimic the input element styles */
430430
}
431431
}
432432

433+
.wp-block-jetpack-contact-form .wp-block-button__width-25,
433434
.wp-block-jetpack-contact-form .grunion-field-width-25-wrap {
434435
flex: 1 1 calc(25% - calc(var(--wp--style--block-gap, 1.5rem) * 1));
435436
max-width: 25%;
@@ -440,11 +441,13 @@ that needs to mimic the input element styles */
440441
max-width: 33.33%;
441442
}
442443

444+
.wp-block-jetpack-contact-form .wp-block-button__width-50,
443445
.wp-block-jetpack-contact-form .grunion-field-width-50-wrap {
444446
flex: 1 1 calc(50% - calc(var(--wp--style--block-gap, 1.5rem) * 1));
445447
max-width: 50%;
446448
}
447449

450+
.wp-block-jetpack-contact-form .wp-block-button__width-75,
448451
.wp-block-jetpack-contact-form .grunion-field-width-75-wrap {
449452
flex: 1 1 calc(75% - calc(var(--wp--style--block-gap, 1.5rem) * 1));
450453
max-width: 75%;

0 commit comments

Comments
 (0)