mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
refactor(theme-classic): merge CSS files for Heading (#6759)
This commit is contained in:
parent
44a65f3337
commit
17b8eded79
|
|
@ -11,7 +11,6 @@ import type {Props} from '@theme/Heading';
|
|||
import {translate} from '@docusaurus/Translate';
|
||||
import {useThemeConfig} from '@docusaurus/theme-common';
|
||||
|
||||
import './styles.css';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function AnchorHeading({as: As, id, ...props}: Props) {
|
||||
|
|
|
|||
|
|
@ -1,22 +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.
|
||||
*/
|
||||
|
||||
.hash-link {
|
||||
opacity: 0;
|
||||
padding-left: 0.5rem;
|
||||
transition: opacity var(--ifm-transition-fast);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.hash-link::before {
|
||||
content: '#';
|
||||
}
|
||||
|
||||
.hash-link:focus,
|
||||
*:hover > .hash-link {
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
@ -17,3 +17,19 @@ See https://twitter.com/JoshWComeau/status/1332015868725891076
|
|||
.anchorWithHideOnScrollNavbar {
|
||||
scroll-margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
:global(.hash-link) {
|
||||
opacity: 0;
|
||||
padding-left: 0.5rem;
|
||||
transition: opacity var(--ifm-transition-fast);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
:global(.hash-link::before) {
|
||||
content: '#';
|
||||
}
|
||||
|
||||
:global(.hash-link:focus),
|
||||
:global(*:hover > .hash-link) {
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue