mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 02:37:59 +02:00
refactor(v2): rename class main-docs-wrapper to docs-wrapper (#4619)
This commit is contained in:
parent
2d89d5c84f
commit
073fdeae8e
3 changed files with 8 additions and 3 deletions
|
@ -9,7 +9,7 @@
|
||||||
--doc-sidebar-width: 300px;
|
--doc-sidebar-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.main-docs-wrapper) {
|
:global(.docs-wrapper) {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const ThemeClassNames = {
|
||||||
wrapper: {
|
wrapper: {
|
||||||
main: 'main-wrapper',
|
main: 'main-wrapper',
|
||||||
blogPages: 'blog-wrapper',
|
blogPages: 'blog-wrapper',
|
||||||
docPages: 'main-docs-wrapper',
|
docPages: 'docs-wrapper',
|
||||||
mdxPages: 'mdx-wrapper',
|
mdxPages: 'mdx-wrapper',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -105,13 +105,18 @@ function MyComponent() {
|
||||||
|
|
||||||
We provide some predefined CSS class names to provide access for developers to style layout of a page globally in Docusaurus. The purpose is to have stable classnames shared by all themes that are meant to be targeted by custom CSS.
|
We provide some predefined CSS class names to provide access for developers to style layout of a page globally in Docusaurus. The purpose is to have stable classnames shared by all themes that are meant to be targeted by custom CSS.
|
||||||
|
|
||||||
import ThemeClassNamesCode from '!!raw-loader!@site/../packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts'; import CodeBlock from '@theme/CodeBlock';
|
```mdx-code-block
|
||||||
|
import ThemeClassNamesCode from '!!raw-loader!@site/../packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts';
|
||||||
|
|
||||||
|
import CodeBlock from '@theme/CodeBlock';
|
||||||
|
|
||||||
<CodeBlock className="language-ts">
|
<CodeBlock className="language-ts">
|
||||||
{ThemeClassNamesCode
|
{ThemeClassNamesCode
|
||||||
|
// remove source comments
|
||||||
.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,'')
|
.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,'')
|
||||||
.trim()}
|
.trim()}
|
||||||
</CodeBlock>
|
</CodeBlock>
|
||||||
|
```
|
||||||
|
|
||||||
### CSS modules {#css-modules}
|
### CSS modules {#css-modules}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue