-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: make main heading font size changeable via CSS var #5377
Conversation
@@ -24,7 +24,7 @@ export const MainHeading: HeadingComponent = function MainHeading({...props}) { | |||
<h1 | |||
{...props} | |||
id={undefined} // h1 headings do not need an id because they don't appear in the TOC | |||
className={styles.h1Heading}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we removed h1Heading
class, should this change be marked as BC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to prefer reporting breaking changes even if tiny,
But I'd say CSS module classes do not need to be reported as breaking changes as it would only add noise.
It's somehow implicit it is internal code (similarly to the HTML tree) and the user probably understand this, as it's not easy to create a css module selector in the first place.
✔️ [V2] 🔨 Explore the source changes: 96f42a2 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/611d1309553183000778458c 😎 Browse the preview: https://deploy-preview-5377--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5377--docusaurus-2.netlify.app/ |
Size Change: -349 B (0%) Total Size: 804 kB
ℹ️ View Unchanged
|
thanks 👍 |
Motivation
Instead of changing font size of main header via
font-size
property, it should only be possible to change related--ifm-h1-font-size
CSS var. This is better approach also allows us to get rid of one extra class.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Preview (actually, there is no visible changes)
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)