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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Import @wordpress/base-styles modules directly instead of through the jetpack-base-styles wrapper. No change to the built CSS.


18 changes: 10 additions & 8 deletions projects/packages/forms/src/blocks/contact-form/editor.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/breakpoints";
@use "@wordpress/base-styles/mixins";
@use "@wordpress/base-styles/variables";
@use "../shared/styles/field-hints" as *;

:where(.jetpack-contact-form) {
Expand Down Expand Up @@ -174,7 +176,7 @@
flex: 1 1 0;
}

@media (max-width: #{ (gb.$break-mobile) }) {
@media (max-width: #{ (breakpoints.$break-mobile) }) {

&[class*="jetpack-field__width-"] {
flex-basis: 100%;
Expand Down Expand Up @@ -311,16 +313,16 @@
.form-placeholder__patterns-modal {
max-width: 1200px;

@include gb.break-small() {
width: calc(100% - #{ gb.$grid-unit-20 * 2 });
height: calc(100% - #{ gb.$header-height * 2 });
@include mixins.break-small() {
width: calc(100% - #{ variables.$grid-unit-20 * 2 });
height: calc(100% - #{ variables.$header-height * 2 });
}

@include gb.break-medium() {
width: gb.$break-medium - gb.$grid-unit-20 * 2;
@include mixins.break-medium() {
width: breakpoints.$break-medium - variables.$grid-unit-20 * 2;
}

@include gb.break-large() {
@include mixins.break-large() {
height: 80%;
width: 80%;
max-height: none;
Expand Down
4 changes: 2 additions & 2 deletions projects/packages/forms/src/blocks/field-hidden/editor.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/breakpoints";

.jetpack-form-hidden-field-inputs {
text-wrap: pretty;
}

@media (max-width: #{ (gb.$break-mobile) }) {
@media (max-width: #{ (breakpoints.$break-mobile) }) {

.jetpack-form-hidden-field-inputs {
flex-wrap: wrap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/breakpoints";
@use "../shared/styles/visually-hidden" as *;
@use "../shared/styles/empty_image_option" as *;

@mixin image-select-responsive-width {
width: calc(( 1 / var(--row-options-count) ) * 100% - var(--jetpack-field-image-options-gap) * ( (var(--row-options-count) - 1) / var(--row-options-count) ));

// Mobile adjustments for number of options per row
@media (max-width: #{ (gb.$break-mobile) }) {
@media (max-width: #{ (breakpoints.$break-mobile) }) {

&.is-supersized {
--row-options-count: 1 !important;
Expand Down
11 changes: 6 additions & 5 deletions projects/packages/forms/src/blocks/form-step/editor.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Editor styles for the form-step block
*/
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/colors";
@use "@wordpress/base-styles/variables";

.jetpack-form-step__break {
display: flex;
Expand All @@ -20,15 +21,15 @@
}

.jetpack-form-step__label {
background-color: var(--wp-components-color-background, gb.$white);
color: var(--wp-components-color-foreground, gb.$gray-900);
background-color: var(--wp-components-color-background, colors.$white);
color: var(--wp-components-color-foreground, colors.$gray-900);
font-size: var(--wp--preset--font-size--normal, 16px);
padding: 0 calc(var(--wp--style--block-gap, 1.5rem) * 0.5);
border-radius: var(--wp--preset--spacing--20, gb.$radius-medium);
border-radius: var(--wp--preset--spacing--20, variables.$radius-medium);
font-weight: var(--wpds-typography-font-weight-emphasis);
white-space: nowrap;
margin: 0 8px;
font-family: gb.$default-font;
font-family: variables.$default-font;
}
}

Expand Down
6 changes: 3 additions & 3 deletions projects/packages/forms/src/contact-form/css/phone-field.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/breakpoints";
// grunion-field-wrap is a backwards compat class,
//need to remove this generic classes
// *-wrap classes are helpers added by backend
Expand Down Expand Up @@ -36,9 +36,9 @@
text-overflow: ellipsis;
white-space: nowrap;

@media (max-width: #{ (gb.$break-mobile) }) {
@media (max-width: #{ (breakpoints.$break-mobile) }) {

max-width: calc(gb.$break-mobile / 3);
max-width: calc(breakpoints.$break-mobile / 3);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/mixins";

/*
* `@wordpress/interface` hides pinned items on narrow viewports so the list
Expand All @@ -10,7 +10,7 @@
.jetpack-form-header-actions__view-responses {
display: none;

@include gb.break-small() {
@include mixins.break-small() {
display: inline-flex;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/mixins";

// Wider than the core block editor welcome guide's 312px, to give the
// artwork more room. Core caps the frame at `calc(100vw - 32px)` below
Expand All @@ -18,7 +18,7 @@
// against an auto-height parent, so it resolves to nothing. Scoped to
// break-small and up, matching where core applies the guide's own
// min-height, so narrow screens can still shrink to fit.
@include gb.break-small() {
@include mixins.break-small() {

.components-guide__container {
min-block-size: 496px;
Expand Down
Loading