mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
refactor(theme-classic): clean up CSS of doc sidebar item (#6622)
* 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
This commit is contained in:
parent
da9075105a
commit
cfef4755da
4 changed files with 11 additions and 34 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
@media (min-width: 997px) {
|
||||
.menuLinkText {
|
||||
cursor: initial;
|
||||
}
|
||||
|
||||
.menuLinkText:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.menuLinkText.hasHref {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
|
@ -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',
|
||||
|
@ -74,6 +83,8 @@ const sidebars = {
|
|||
{
|
||||
type: 'category',
|
||||
label: 'HTML items tests',
|
||||
collapsed: false,
|
||||
collapsible: false,
|
||||
items: [
|
||||
// title
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue