Skip to content

Commit

Permalink
Standardise opacity as 0.04
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Nov 17, 2022
1 parent 5ff8bd6 commit e8ec5e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
1 change: 1 addition & 0 deletions packages/base-styles/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ $alert-green: #4ab866;

:root {
--wp-block-synced-color: #7a00df;
--wp-block-synced-color--rgb: #{hex-to-rgb(#7a00df)};
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
}

&:hover:not(.is-dragging-blocks)::before {
background: rgba(var(--wp-admin-theme-color--rgb), 0.3);
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color) inset;
}

&.is-reusable:hover:not(.is-dragging-blocks)::before,
&.wp-block-template-part:hover:not(.is-dragging-blocks)::before {
filter: brightness(0.95);
background:
linear-gradient(transparentize($white, 0.1), transparentize($white, 0.1)),
linear-gradient(var(--wp-block-synced-color), var(--wp-block-synced-color));
background: rgba(var(--wp-block-synced-color--rgb), 0.04);
box-shadow: 0 0 0 $border-width var(--wp-block-synced-color) inset;
}

Expand Down
10 changes: 2 additions & 8 deletions packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,10 @@
border-bottom-right-radius: $radius-block-ui;
}
&.is-branch-selected:not(.is-selected):not(.is-synced-branch) {
// Lighten a CSS variable without introducing a new SASS variable
background:
linear-gradient(transparentize($white, 0.1), transparentize($white, 0.1)),
linear-gradient(var(--wp-admin-theme-color), var(--wp-admin-theme-color));
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
}
&.is-synced-branch:not(.is-selected) {
// Lighten a CSS variable without introducing a new SASS variable
background:
linear-gradient(transparentize($white, 0.1), transparentize($white, 0.1)),
linear-gradient(var(--wp-block-synced-color), var(--wp-block-synced-color));
background: rgba(var(--wp-block-synced-color--rgb), 0.04);
}
&.is-branch-selected.is-first-selected td:first-child {
border-top-left-radius: $radius-block-ui;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
opacity: 0;
padding: 0;
transition: all ease 0.2s;
background:
linear-gradient(transparentize($white, 0.1), transparentize($white, 0.1)),
linear-gradient(var(--wp-block-synced-color), var(--wp-block-synced-color));
background: rgba(var(--wp-block-synced-color--rgb), 0.04);
border-radius: 2px;
@include reduce-motion(transition);

Expand Down

0 comments on commit e8ec5e6

Please sign in to comment.