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
@@ -1,4 +1,4 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/colors";

// --spacing-base is provided by admin-ui's ThemeProvider in some contexts,
// but not guaranteed here. Define a local fallback.
Expand All @@ -25,7 +25,7 @@ $spacing-base: var(--spacing-base, 8px);
display: flex;
align-items: center;
position: relative;
border-bottom: 1px solid gb.$gray-100;
border-bottom: 1px solid colors.$gray-100;
padding-inline: calc(#{$spacing-base} * 3); // 24px — matches admin-ui header
background-color: #fff;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Import @wordpress/base-styles modules directly instead of through the jetpack-base-styles wrapper. No change to the built CSS.


Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/colors";
@use "@wordpress/base-styles/variables";

.jetpack-blogging-prompt {
border: 1px solid gb.$gray-300;
border: 1px solid colors.$gray-300;
border-radius: 2px;
box-sizing: border-box;
padding: 24px;
Expand All @@ -11,7 +12,7 @@
background-position: -5px center;
background-size: 24px 24px;
font-size: 14px;
margin-bottom: gb.$grid-unit-20;
margin-bottom: variables.$grid-unit-20;
padding-inline-start: 22px;

&.is-bloganuary-icon {
Expand All @@ -23,7 +24,7 @@

&__text {
font-size: 24px;
margin-bottom: gb.$grid-unit-20;
margin-bottom: variables.$grid-unit-20;
}

&__answers-link {
Expand All @@ -37,7 +38,7 @@
}

&__answers-gravatar {
border: 2px solid gb.$white;
border: 2px solid colors.$white;
border-radius: 50%;
height: 24px;
vertical-align: middle;
Expand All @@ -58,8 +59,8 @@

&.is-style-quote {
border: none;
border-inline-start: 4px solid gb.$gray-800;
margin-bottom: gb.$grid-unit-20;
border-inline-start: 4px solid colors.$gray-800;
margin-bottom: variables.$grid-unit-20;
padding: 0 24px;
}

Expand Down
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-blogroll-item-container: bitem;

@mixin break-bloroll-container-mobile() {

@container #{ ($jetpack-blogroll-item-container)} (min-width: #{ (gb.$break-mobile) }) {
@container #{ ($jetpack-blogroll-item-container)} (min-width: #{ (breakpoints.$break-mobile) }) {
@content;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/breakpoints";
@use "@wordpress/base-styles/variables";

.wp-block-jetpack-business-hours {
overflow: hidden;
Expand Down Expand Up @@ -30,7 +31,7 @@
// The Site Editor iframe doesn't include common styles,
// from which the font size of the labels are inherited.
// https://github.com/WordPress/gutenberg/blob/3da717b8d0ac7d7821fc6d0475695ccf3ae2829f/packages/base-styles/_variables.scss#L16
font-size: gb.$default-font-size;
font-size: variables.$default-font-size;
}

.components-base-control__field {
Expand Down Expand Up @@ -133,14 +134,14 @@
*/
@mixin editor-area-is-small {

@media ( max-width: gb.$break-xlarge ) {
@media ( max-width: breakpoints.$break-xlarge ) {

.is-sidebar-opened {
@content;
}
}

@media ( max-width: gb.$break-small ) {
@media ( max-width: breakpoints.$break-small ) {
@content;
}

Expand Down
33 changes: 17 additions & 16 deletions projects/plugins/jetpack/extensions/blocks/donations/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
// by inheriting from the surrounding context. Per-state colors (active tab,
// selected amount) are rendered via a per-instance scoped <style> element
// because the postcss build inlines var() fallbacks at compile time.
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/colors";
@use "@wordpress/base-styles/mixins";

.wp-block-jetpack-donations {
// Default border. User-set border (via the Border style support) renders as
// an inline style on this element, which wins on specificity.
border: 1px solid gb.$gray-400;
border: 1px solid colors.$gray-400;
// Clip children to any user-set border-radius; without this, tab corners
// extend past the rounded outer corners.
overflow: hidden;

.donations__nav {
display: flex;
border-bottom: 1px solid gb.$gray-400;
border-bottom: 1px solid colors.$gray-400;
}

.donations__nav-item {
Expand All @@ -24,12 +25,12 @@
flex: 1;
text-align: center;
padding: 12px;
border-inline-start: 1px solid gb.$gray-400;
border-inline-start: 1px solid colors.$gray-400;
background: transparent;
color: inherit;
cursor: pointer;

@include gb.break-small() {
@include mixins.break-small() {
padding: 16px 24px;
}

Expand All @@ -38,24 +39,24 @@
}

&.is-active {
background: gb.$gray-900;
color: gb.$white;
background: colors.$gray-900;
color: colors.$white;
cursor: default;
}
}

.donations__content {
padding: 16px;

@include gb.break-small() {
@include mixins.break-small() {
padding: 32px;
}

h4,
p {
margin: 0 0 16px;

@include gb.break-small() {
@include mixins.break-small() {
margin: 0 0 24px;
}
}
Expand All @@ -66,7 +67,7 @@
display: flex;
flex-wrap: wrap;

@include gb.break-small() {
@include mixins.break-small() {
margin: 0 0 24px;
}
}
Expand All @@ -76,14 +77,14 @@
padding: 16px 24px;
background-color: transparent;
color: inherit;
border: 1px solid gb.$gray-400;
border: 1px solid colors.$gray-400;
margin-inline-end: 8px;
margin-bottom: 8px;
font-weight: 600;
white-space: nowrap;

&.has-error {
box-shadow: 0 0 0 1px gb.$white, 0 0 0 3px gb.$alert-red;
box-shadow: 0 0 0 1px colors.$white, 0 0 0 3px colors.$alert-red;
outline: 2px solid transparent;
outline-offset: -2px;
}
Expand All @@ -99,7 +100,7 @@
margin-bottom: 16px;
margin-top: 16px;

@include gb.break-small() {
@include mixins.break-small() {
margin-bottom: 32px;
margin-top: 32px;
}
Expand Down Expand Up @@ -133,21 +134,21 @@
gap: 8px;
padding: 16px 16px 0;

@include gb.break-small() {
@include mixins.break-small() {
gap: 12px;
padding: 24px 24px 0;
}
}

.donations__nav-item {
border: 1px solid gb.$gray-400;
border: 1px solid colors.$gray-400;
border-radius: 9999px;
}

// Restore the inline-start border that the default style strips off
// the first item — every pill needs a full border.
.donations__nav-item:first-child {
border-inline-start: 1px solid gb.$gray-400;
border-inline-start: 1px solid colors.$gray-400;
}

}
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/colors";
@use "common";

.editor-styles-wrapper .wp-block-jetpack-donations {
Expand All @@ -7,7 +7,7 @@
cursor: text;

&.has-focus {
box-shadow: 0 0 0 1px gb.$white, 0 0 0 3px var(--wp-admin-theme-color);
box-shadow: 0 0 0 1px colors.$white, 0 0 0 3px var(--wp-admin-theme-color);
outline: 2px solid transparent;
outline-offset: -2px;
}
Expand All @@ -29,12 +29,12 @@
}

.donations__amount [data-rich-text-placeholder]::after {
color: gb.$gray-400;
color: colors.$gray-400;
opacity: 1;
}

.donations__custom-amount .donations__amount-value {
color: gb.$gray-400;
color: colors.$gray-400;
}

.donations__donate-button-wrapper:not(.alignleft):not(.alignright) {
Expand Down
27 changes: 14 additions & 13 deletions projects/plugins/jetpack/extensions/blocks/donations/view.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use "sass:math";
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
@use "@wordpress/base-styles/colors";
@use "@wordpress/base-styles/variables";
@use "common";
@use "../../shared/memberships";

Expand Down Expand Up @@ -27,9 +28,9 @@

&::before {
content: "";
background-color: gb.$gray-600;
width: gb.$spinner-size;
height: gb.$spinner-size;
background-color: colors.$gray-600;
width: variables.$spinner-size;
height: variables.$spinner-size;
opacity: 0.7;
border-radius: 100%;
position: absolute;
Expand All @@ -40,16 +41,16 @@

&::after {
content: "";
background-color: gb.$white;
width: math.div(gb.$spinner-size, 4.5);
height: math.div(gb.$spinner-size, 4.5);
background-color: colors.$white;
width: math.div(variables.$spinner-size, 4.5);
height: math.div(variables.$spinner-size, 4.5);
border-radius: 100%;
position: absolute;
top: 50%;
inset-inline-start: 50%;
margin-inline-start: math.div(-(gb.$spinner-size), 3);
margin-top: math.div(-(gb.$spinner-size), 3);
transform-origin: math.div(gb.$spinner-size, 3) math.div(gb.$spinner-size, 3);
margin-inline-start: math.div(-(variables.$spinner-size), 3);
margin-top: math.div(-(variables.$spinner-size), 3);
transform-origin: math.div(variables.$spinner-size, 3) math.div(variables.$spinner-size, 3);
animation: spinner 1s infinite linear;
}
}
Expand Down Expand Up @@ -82,7 +83,7 @@
cursor: pointer;

&.is-selected {
box-shadow: 0 0 0 1px gb.$white, 0 0 0 3px var(--wp-admin-theme-color);
box-shadow: 0 0 0 1px colors.$white, 0 0 0 3px var(--wp-admin-theme-color);
outline: 2px solid transparent;
outline-offset: -2px;
}
Expand All @@ -98,7 +99,7 @@

&:empty::after {
content: attr(data-empty-text);
color: gb.$gray-400;
color: colors.$gray-400;
}

&:focus {
Expand All @@ -109,7 +110,7 @@

.donations__range-error {
display: none;
color: gb.$alert-red;
color: colors.$alert-red;
font-size: 0.875em;
margin-block-end: 8px;

Expand Down
6 changes: 3 additions & 3 deletions projects/plugins/jetpack/extensions/blocks/gif/editor.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/colors";

.wp-block-jetpack-gif {

Expand Down Expand Up @@ -75,7 +75,7 @@
width: calc(100% / 10 - 4px);

&:hover {
box-shadow: 0 0 0 1px gb.$gray-600;
box-shadow: 0 0 0 1px colors.$gray-600;
}

&:focus {
Expand All @@ -94,6 +94,6 @@
}

svg path {
fill: gb.$gray-200;
fill: colors.$gray-200;
}
}
4 changes: 2 additions & 2 deletions projects/plugins/jetpack/extensions/blocks/gif/style.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/colors";

.wp-block-jetpack-gif {
clear: both;
Expand All @@ -22,7 +22,7 @@
.wp-block-jetpack-gif-caption {
margin-top: 0.5em;
margin-bottom: 1em;
color: gb.$gray-600;
color: colors.$gray-600;
text-align: center;
}

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/breakpoints";
@use "view";

.wp-block-jetpack-google-docs-embed {
Expand Down Expand Up @@ -57,7 +57,7 @@

// Unless these have a min-width, they collapse when floated.
&__wrapper {
min-width: gb.$break-zoomed-in;
min-width: breakpoints.$break-zoomed-in;
}
}
}
Loading
Loading