Skip to content

Commit

Permalink
Use CSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Mar 8, 2024
1 parent bf026c5 commit 6769436
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"npm": "10.5.0"
},
"devDependencies": {
"@wordpress/base-styles": "4.44.0",
"@wordpress/env": "^9.5.0",
"@wordpress/icons": "^9.44.0",
"@wordpress/scripts": "^27.4.0",
Expand Down
23 changes: 13 additions & 10 deletions src/editor-style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// WordPress base styles
@import "../node_modules/@wordpress/base-styles/variables";

// Hack to load css files into iframe editor instances on WordPress 6.0.
// https://github.com/WordPress/gutenberg/pull/40842
// TODO: Once the minimum WordPress version supported by the plugin
Expand All @@ -24,7 +27,7 @@

.fsb-flexible-spacer__device-ttl {
position: absolute;
top: 2px;
top: 0;
left: 0;
z-index: 1;
display: flex;
Expand All @@ -34,7 +37,7 @@
font-size: 12px;
font-weight: bold;
line-height: 1.2;
color: #757575;
color: $gray-700;
text-align: center;
pointer-events: none;
user-select: none;
Expand All @@ -48,7 +51,7 @@

.fsb-flexible-spacer__breakpoint {
position: absolute;
top: -15px;
top: $grid-unit-15 * -1;
left: 0;
z-index: 2;
display: flex;
Expand All @@ -64,16 +67,16 @@
display: flex;
align-items: center;
justify-content: center;
width: 70px;
height: 20px;
width: $grid-unit-10 * 9;
height: $grid-unit-30;
font-size: 11px;
color: #fff;
color: $white;
text-align: center;
background: #757575;
border-radius: 2px;
background: $gray-700;
border-radius: $radius-block-ui;

&:last-child:not(:first-child) {
margin-left: calc(33.3% - 70px);
margin-left: calc(33.3% - $grid-unit-10 * 9);
}
}

Expand All @@ -86,7 +89,7 @@
}

.components-resizable-box__container {
background: #f0f0f0;
background: $gray-100;

&.is-negative {
background: #f6b9b9;
Expand Down

0 comments on commit 6769436

Please sign in to comment.