Skip to content

Commit

Permalink
Move to mixins in base-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 16, 2024
1 parent 17551da commit 3f9c376
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

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

9 changes: 9 additions & 0 deletions packages/base-styles/_mixins.scss
Expand Up @@ -357,6 +357,15 @@
}
}

@mixin link-reset {
&:focus {
color: var(--wp-admin-theme-color--rgb);
/* stylelint-disable-next-line declaration-property-value-disallowed-list */
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
border-radius: $radius-block-ui;
}
}

// The editor input reset with increased specificity to avoid theme styles bleeding in.
@mixin editor-input-reset() {
font-family: $editor-html-font !important;
Expand Down
1 change: 1 addition & 0 deletions packages/dataviews/package.json
Expand Up @@ -30,6 +30,7 @@
"@ariakit/react": "^0.3.12",
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "file:../a11y",
"@wordpress/base-styles": "file:../base-styles",
"@wordpress/components": "file:../components",
"@wordpress/compose": "file:../compose",
"@wordpress/element": "file:../element",
Expand Down
8 changes: 3 additions & 5 deletions packages/dataviews/src/style.scss
@@ -1,3 +1,5 @@
@import "../../base-styles/mixins";

.dataviews-wrapper {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -228,11 +230,7 @@
&:hover {
color: $gray-900;
}
&:focus {
color: var(--wp-admin-theme-color--rgb);
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
border-radius: $radius-block-ui;
}
@include link-reset();
}

button.components-button.is-link {
Expand Down

0 comments on commit 3f9c376

Please sign in to comment.