From 3048942aef0984b10b5fefe06d6016ab6df72e55 Mon Sep 17 00:00:00 2001 From: Endi Date: Wed, 6 Nov 2019 22:54:09 +0700 Subject: [PATCH] fix(v2): hash-link should not be cut-off in doc container (#1942) * fix(v2): hash-link should not be cut-off in doc container * nits --- CHANGELOG-2.x.md | 1 + .../docusaurus-theme-classic/src/theme/DocItem/styles.module.css | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md index 1df6b26441..9f93bdbb78 100644 --- a/CHANGELOG-2.x.md +++ b/CHANGELOG-2.x.md @@ -6,6 +6,7 @@ - Add feed for blog posts. - **HOTFIX for 2.0.0-alpha.32** - Fix build compilation if exists only one code tab. - Add table of contents highlighting on scroll. +- Add minor padding to docs container so that hash-link won't be cut off. - **BREAKING** `prismTheme` is renamed to `theme` as part new `prism` object in `themeConfig` field in your `docusaurus.config.js`. Eg: ```diff themeConfig: { diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocItem/styles.module.css index e04489c1c1..3a6c9f40ee 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/styles.module.css +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/styles.module.css @@ -19,6 +19,7 @@ .docItemContainer { margin: 0 auto; + padding: 0 0.5rem; max-width: 45em; } @@ -34,4 +35,8 @@ .tableOfContents { display: none; } + + .docItemContainer { + padding: 0 0.3rem; + } }