feat: Add docs-related stable classnames (#5445)

This commit is contained in:
Sébastien Lorber 2021-08-31 11:00:46 +02:00 committed by GitHub
parent 280a8abac9
commit 3a312d964d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 96 additions and 22 deletions

View file

@ -6,6 +6,8 @@
*/
// These class names are used to style page layouts in Docusaurus
// Those are meant to be targeted by user-provided custom CSS selectors
// /!\ Please do not modify the classnames! This is a breaking change, and annoying for users!
export const ThemeClassNames = {
page: {
blogListPage: 'blog-list-page',
@ -22,7 +24,34 @@ export const ThemeClassNames = {
wrapper: {
main: 'main-wrapper',
blogPages: 'blog-wrapper',
docPages: 'docs-wrapper',
docsPages: 'docs-wrapper',
mdxPages: 'mdx-wrapper',
},
// /!\ Please keep the naming convention consistent!
// Something like: "theme-{blog,doc,version,page}?-<suffix>"
common: {
editThisPage: 'theme-edit-this-page',
lastUpdated: 'theme-last-updated',
},
layout: {
// TODO add other stable classNames here
},
docs: {
docVersionBanner: 'theme-doc-version-banner',
docVersionBadge: 'theme-doc-version-badge',
docMarkdown: 'theme-doc-markdown',
docTocMobile: 'theme-doc-toc-mobile',
docTocDesktop: 'theme-doc-toc-desktop',
docFooter: 'theme-doc-footer',
docFooterTagsRow: 'theme-doc-footer-tags-row',
docFooterEditMetaRow: 'theme-doc-footer-edit-meta-row',
docSidebarMenu: 'theme-doc-sidebar-menu',
docSidebarItemCategory: 'theme-doc-sidebar-item-category',
docSidebarItemLink: 'theme-doc-sidebar-item-link',
// TODO add other stable classNames here
},
blog: {
// TODO add other stable classNames here
},
};