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

components: Remove wp-g2 imports from visually-hidden #31210

Merged
merged 1 commit into from
Apr 27, 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
8 changes: 6 additions & 2 deletions packages/components/src/ui/visually-hidden/styles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/**
* External dependencies
*/
import { css, ui } from '@wp-g2/styles';
import { css } from 'emotion';
/**
* Internal dependencies
*/
import { COLORS } from '../../utils/colors-values';

export const VisuallyHidden = css`
border: 0;
Expand All @@ -17,7 +21,7 @@ export const VisuallyHidden = css`
word-wrap: normal !important;

&:focus {
background-color: ${ ui.get( 'lightGray300' ) };
background-color: ${ COLORS.lightGray[ '300' ] };
clip: auto !important;
clip-path: none;
color: #444;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`VisuallyHidden should render correctly 1`] = `
.emotion-0.emotion-0.emotion-0.emotion-0.emotion-0.emotion-0.emotion-0 {
.emotion-0 {
border: 0;
-webkit-clip: rect( 1px,1px,1px,1px );
clip: rect( 1px,1px,1px,1px );
Expand All @@ -17,9 +17,8 @@ exports[`VisuallyHidden should render correctly 1`] = `
word-wrap: normal !important;
}

.emotion-0.emotion-0.emotion-0.emotion-0.emotion-0.emotion-0.emotion-0:focus {
.emotion-0:focus {
background-color: #edeff0;
background-color: var(--wp-g2-light-gray-300);
-webkit-clip: auto !important;
clip: auto !important;
-webkit-clip-path: none;
Expand Down