Skip to content

Commit

Permalink
refactor(theme-classic): clean up CSS of doc sidebar item (#6622)
Browse files Browse the repository at this point in the history
* refactor(theme-classic): clean up doc sidebar item CSS

* Use link placeholder for Introduction category

* Use test pages for dogfooding

* Update sidebars.js

* Add another test case
  • Loading branch information
lex111 committed Feb 11, 2022
1 parent da90751 commit cfef475
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ function DocSidebarItemCategory({
className={clsx('menu__link', {
'menu__link--sublist': collapsible && !href,
'menu__link--active': isActive,
[styles.menuLinkText]: !collapsible,
[styles.hasHref]: !!hrefWithSSRFallback,
})}
onClick={
collapsible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@
*/

@media (min-width: 997px) {
.menuLinkText {
cursor: initial;
}

.menuLinkText:hover {
background: none;
}

.menuLinkText.hasHref {
cursor: pointer;
}

.menuHtmlItem {
padding: var(--ifm-menu-link-padding-vertical)
var(--ifm-menu-link-padding-horizontal);
Expand Down

This file was deleted.

11 changes: 11 additions & 0 deletions website/_dogfooding/docs-tests-sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ const sidebars = {
collapsible: false,
items: ['index', 'more-test'],
},
{
type: 'category',
label: 'Another category with index',
collapsible: false,
link: {
type: 'generated-index',
},
items: ['more-test'],
},
{
type: 'category',
label: 'Huge sidebar category',
Expand Down Expand Up @@ -74,6 +83,8 @@ const sidebars = {
{
type: 'category',
label: 'HTML items tests',
collapsed: false,
collapsible: false,
items: [
// title
{
Expand Down

0 comments on commit cfef475

Please sign in to comment.