mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-22 22:48:29 +08:00
2acb7b217a
* site: use css token * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
import { css, Global } from '@emotion/react';
|
|
import { useTheme } from 'antd-style';
|
|
|
|
export default () => {
|
|
const token = useTheme();
|
|
return (
|
|
<Global
|
|
styles={css`
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
> a[aria-hidden]:first-child {
|
|
float: left;
|
|
width: 20px;
|
|
padding-inline-end: ${token.paddingXXS}px;
|
|
font-size: 0;
|
|
line-height: inherit;
|
|
text-align: right;
|
|
padding-inline-end: ${token.paddingXXS}px;
|
|
margin-inline-start: -${token.marginLG}px;
|
|
|
|
[data-direction='rtl'] & {
|
|
float: right;
|
|
}
|
|
|
|
&:hover {
|
|
border: 0;
|
|
}
|
|
|
|
> .icon-link::before {
|
|
font-size: ${token.fontSizeXL}px;
|
|
content: '#';
|
|
}
|
|
}
|
|
|
|
&:not(:hover) > a[aria-hidden]:first-child > .icon-link {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
`}
|
|
/>
|
|
);
|
|
};
|