diff --git a/.changeset/tasty-points-speak.md b/.changeset/tasty-points-speak.md new file mode 100644 index 000000000..7741629ad --- /dev/null +++ b/.changeset/tasty-points-speak.md @@ -0,0 +1,5 @@ +--- +'@cloudfour/patterns': patch +--- + +Remove focus-visible polyfill diff --git a/.storybook/preview.js b/.storybook/preview.js index 5e67268e7..6d7711ea7 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -5,7 +5,6 @@ import twig from 'react-syntax-highlighter/dist/esm/languages/prism/twig'; import { withTheme } from './theme-decorator'; import { withTextFlow } from './text-flow-decorator'; import tokens from '../src/compiled/tokens/js/tokens'; -import 'focus-visible'; import '../src/index-with-dependencies.scss'; import './preview.scss'; import { makeTwigInclude } from '../src/make-twig-include'; diff --git a/package-lock.json b/package-lock.json index 7cbfdad85..3148c228f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "12.3.1", "license": "MIT", "dependencies": { - "focus-visible": "5.2.0", "prismjs": "1.29.0" }, "devDependencies": { @@ -22061,10 +22060,6 @@ "node": ">=10" } }, - "node_modules/focus-visible": { - "version": "5.2.0", - "integrity": "sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==" - }, "node_modules/for-in": { "version": "1.0.2", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", @@ -57730,10 +57725,6 @@ "tslib": "^1.9.3" } }, - "focus-visible": { - "version": "5.2.0", - "integrity": "sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==" - }, "for-in": { "version": "1.0.2", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", diff --git a/package.json b/package.json index 1e5a144db..3f3dfa19d 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "!src/index.scss" ], "dependencies": { - "focus-visible": "5.2.0", "prismjs": "1.29.0" }, "devDependencies": { diff --git a/src/design/defaults.stories.mdx b/src/design/defaults.stories.mdx index fc4f309df..e526077dd 100644 --- a/src/design/defaults.stories.mdx +++ b/src/design/defaults.stories.mdx @@ -25,7 +25,7 @@ More options are available via [the Heading component](/docs/components-heading- diff --git a/src/design/demo/theme-content.twig b/src/design/demo/theme-content.twig index f92fd77d3..690087521 100644 --- a/src/design/demo/theme-content.twig +++ b/src/design/demo/theme-content.twig @@ -1,7 +1,7 @@ {% embed '@cloudfour/objects/rhythm/rhythm.twig' %} {% block content %}
- Progressive Web Apps are awesome, especially when they make the best most of the web! That means using both tried and true HTML techniques like links alongside new techniques like display: grid
or focus-visible
!
+ Progressive Web Apps are awesome, especially when they make the best most of the web! That means using both tried and true HTML techniques like links alongside new techniques like display: grid
or :focus-visible
!
diff --git a/src/mixins/_focus.scss b/src/mixins/_focus.scss index ab36bb6f6..cdf97c853 100644 --- a/src/mixins/_focus.scss +++ b/src/mixins/_focus.scss @@ -1,15 +1,13 @@ @mixin focus-visible { - .js-focus-visible & { - &::-moz-focus-inner { - border: 0; - } + &::-moz-focus-inner { + border: 0; + } - &:focus { - outline: 0; + &:focus { + outline: 0; + } - &.focus-visible { - @content; - } - } + &:focus-visible { + @content; } }