-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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(theme-classic): clean up CSS of doc sidebar item #6622
Conversation
@@ -6,18 +6,6 @@ | |||
*/ | |||
|
|||
@media (min-width: 997px) { | |||
.menuLinkText { | |||
cursor: initial; |
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.
If the href
attribute is missing in a link, the default cursor is used, so there is no need for this class.
} | ||
|
||
.menuLinkText:hover { | ||
background: none; |
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.
Also, we don't need this CSS class after introducing menu__list-item-collapsible
.
website/sidebars.js
Outdated
@@ -18,6 +18,7 @@ const sidebars = { | |||
type: 'generated-index', | |||
}, | |||
collapsed: false, | |||
collapsible: false, |
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.
Let's disable collapsing for this category as a dogfooding approach.
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.
We have another section to dogfood now, maybe you can move these tests there?
(one with/without link and with/without collapsible?)
https://deploy-preview-6622--docusaurus-2.netlify.app/tests/docs
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.
Oh yes, that's right, I forgot about that. I guess it's okay if I disable collapsing for the category "HTML items tests".
✔️ [V2] 🔨 Explore the source changes: 1f26b6b 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/62057d5379cc1d00079b39bb 😎 Browse the preview: https://deploy-preview-6622--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6622--docusaurus-2.netlify.app/ |
Size Change: +2.75 kB (0%) Total Size: 774 kB
ℹ️ View Unchanged
|
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.
welcome back 😄
LGTM, just move dogfood to appropriate section so that we can review more edge-cases
(I'm particularly interested to inspect the site with JS disable in multiple scenarios because this is why we added hrefWithSSRFallback
)
website/sidebars.js
Outdated
@@ -18,6 +18,7 @@ const sidebars = { | |||
type: 'generated-index', | |||
}, | |||
collapsed: false, | |||
collapsible: false, |
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.
We have another section to dogfood now, maybe you can move these tests there?
(one with/without link and with/without collapsible?)
https://deploy-preview-6622--docusaurus-2.netlify.app/tests/docs
Thanks! I still want to implement some of my ideas in the near future. |
I'm not sure, we should probably test the following cases:
Currently, the first one does not have a test case. Worth adding one under the |
…o lex111/docsidebar-clean-css
It's make sense to get a full picture, although it is not necessary for this fix. |
The effect looks good to me! |
Motivation
After a cursory look of the final source code produced by Docusaurus, I found that there are two redundant CSS classes for doc sidebar items. So it's safe to remove these classes and the related CSS code.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Preview
Related PRs