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

Update sass version to 1.35.2 with fixes #33433

Merged
merged 5 commits into from
Jul 19, 2021
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
38 changes: 20 additions & 18 deletions bin/packages/build-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,29 @@ async function buildCSS( file ) {
makeDir( path.dirname( outputFile ) ),
readFile( file, 'utf8' ),
] );

const importLists = [
'colors',
'breakpoints',
'variables',
'mixins',
'animations',
'z-index',
]
// Editor styles should be excluded from the default CSS vars output.
.concat(
file.includes( 'common.scss' ) || ! file.includes( 'block-library' )
? [ 'default-custom-properties' ]
: []
)
.map( ( imported ) => `@import "${ imported }";` )
.join( ' ' );

const builtSass = await renderSass( {
file,
includePaths: [ path.join( PACKAGES_DIR, 'base-styles' ) ],
data:
[
'colors',
'breakpoints',
'variables',
'mixins',
'animations',
'z-index',
]
// Editor styles should be excluded from the default CSS vars output.
.concat(
file.includes( 'common.scss' ) ||
! file.includes( 'block-library' )
? [ 'default-custom-properties' ]
: []
)
.map( ( imported ) => `@import "${ imported }";` )
.join( ' ' ) + contents,
//
data: ''.concat( '@use "sass:math";', importLists, contents ),
} );

const result = await postcss(
Expand Down
139 changes: 131 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"react-test-renderer": "17.0.1",
"rimraf": "3.0.2",
"rtlcss": "2.6.2",
"sass": "1.26.12",
"sass": "1.35.2",
"sass-loader": "10.1.1",
"semver": "7.3.2",
"simple-git": "^2.35.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.block-editor-block-draggable-chip-wrapper {
position: absolute;
// Offset position so that cursor is centered over the drag handle.
top: -#{$block-toolbar-height / 2};
top: -#{$block-toolbar-height * 0.5};
left: 0;
}

Expand All @@ -25,7 +25,7 @@
justify-content: flex-start;

> .components-flex__item {
margin-right: $grid-unit-15 / 2;
margin-right: $grid-unit-15 * 0.5;

&:last-child {
margin-right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
}

.containerBorderFullWidth {
left: -$solid-border-space / 2;
right: -$solid-border-space / 2;
left: -$solid-border-space * 0.5;
right: -$solid-border-space * 0.5;
}

.dimmed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}

.innerAppender {
margin: $block-edge-to-content / 2;
margin: $block-edge-to-content * 0.5;
}

.blockBorder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
box-shadow 0.1s linear;
right: 0;
left: 0;
top: -$default-block-margin / 2;
top: -$default-block-margin * 0.5;
border-radius: $radius-block-ui;
border-top: 4px solid $gray-400;
}
Expand Down
10 changes: 5 additions & 5 deletions packages/block-editor/src/components/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@

@include break-small() {
// The !important modifier should be removed when https://github.com/WordPress/gutenberg/issues/24898 refactors the spacing grid.
height: $block-toolbar-height/2;
width: $block-toolbar-height - $grid-unit-15 / 2;
height: $block-toolbar-height*0.5;
width: $block-toolbar-height - $grid-unit-15 * 0.5;
padding-right: $grid-unit-15 - $border-width !important;
padding-left: $grid-unit-15 / 2 !important;
padding-left: $grid-unit-15 * 0.5 !important;

// Extra specificity to override standard toolbar button styles.
&.block-editor-block-mover-button {
min-width: $block-toolbar-height - $grid-unit-15 / 2;
min-width: $block-toolbar-height - $grid-unit-15 * 0.5;
}
}

Expand Down Expand Up @@ -106,7 +106,7 @@
.block-editor-block-mover-button.has-icon {
height: $block-toolbar-height;
// Overrides .components-toolbar-group styles
width: $block-toolbar-height / 2;
width: $block-toolbar-height * 0.5;
padding-left: 0;
padding-right: 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ $image-height: 64px;

.imageWrapper {
height: $image-height;
margin-bottom: $grid-unit / 2;
margin-bottom: $grid-unit * 0.5;
}

.rounded {
border-radius: $image-height / 2;
border-radius: $image-height * 0.5;
overflow: hidden;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

// Compensate for width of block switcher.
.block-editor-block-mover {
margin-left: -$grid-unit-15 / 2;
margin-left: -$grid-unit-15 * 0.5;
}
}

Expand Down
12 changes: 6 additions & 6 deletions packages/block-editor/src/components/block-tools/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

justify-content: center;

top: calc(50% - #{ $button-size-small / 2 });
left: calc(50% - #{ $button-size-small / 2 });
top: calc(50% - #{ $button-size-small * 0.5 });
left: calc(50% - #{ $button-size-small * 0.5 });
}

.block-editor-block-list__block-popover-inserter {
Expand Down Expand Up @@ -150,11 +150,11 @@

// Extra specificity to override standard toolbar button styles.
.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button {
min-width: $block-toolbar-height/2;
width: $block-toolbar-height/2;
min-width: $block-toolbar-height*0.5;
width: $block-toolbar-height*0.5;

svg {
min-width: $block-toolbar-height/2;
min-width: $block-toolbar-height*0.5;
}
}
}
Expand Down Expand Up @@ -204,7 +204,7 @@
align-items: center;

> .components-flex__item {
margin-right: $grid-unit-15 / 2;
margin-right: $grid-unit-15 * 0.5;
}
}
.components-button.has-icon.block-selection-button_drag-handle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.contentContainerStyle {
flex-direction: row;
padding-bottom: $grid-unit-15;
padding-left: $grid-unit-20 / 2;
padding-right: $grid-unit-20 / 2;
padding-left: $grid-unit-20 * 0.5;
padding-right: $grid-unit-20 * 0.5;
}

.containerStyle {
Expand Down
Loading