Skip to content

Commit 803bdb9

Browse files
authored
[Docs] Remove Docusaurus global focus outline styles (elastic#8749)
1 parent 0e32fb5 commit 803bdb9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/docusaurus-preset/src/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import type {
1616
import { Options } from './options';
1717

1818
/**
19-
* Docusaurus plugin to ignore any Infima stylesheet imports.
19+
* Docusaurus plugin to ignore any unwanted style imports, e.g. like Infima stylesheet imports.
2020
* This is needed so that Infima doesn't pollute global CSS scope
2121
* and affect how EUI components are rendered
2222
*/
23-
const ignoreInfimaPlugin: PluginModule = () => ({
24-
name: 'ignore-infima-plugin',
23+
const ignoreInheritedStylesPlugin: PluginModule = () => ({
24+
name: 'ignore-styles-plugin',
2525
configureWebpack() {
2626
return {
2727
module: {
@@ -30,6 +30,10 @@ const ignoreInfimaPlugin: PluginModule = () => ({
3030
test: /node_modules\/infima/,
3131
use: 'null-loader',
3232
},
33+
{
34+
test: /node_modules\/@docusaurus\/theme-common\/lib\/hooks\/styles.css/,
35+
use: 'null-loader',
36+
},
3337
],
3438
},
3539
};
@@ -61,7 +65,7 @@ export default function preset(
6165
];
6266

6367
const plugins: PluginConfig[] = [
64-
ignoreInfimaPlugin,
68+
ignoreInheritedStylesPlugin,
6569
makePluginConfig('@docusaurus/plugin-content-docs', options.docs),
6670
makePluginConfig('@docusaurus/plugin-content-pages', options.pages),
6771
makePluginConfig('@docusaurus/plugin-svgr', options.svgr),

0 commit comments

Comments
 (0)