fix(v2): anchor css not working on blog (#1426)

* fix(v2): anchor css not working on blog

* spacing
This commit is contained in:
Endi 2019-04-30 21:53:10 +07:00 committed by Yangshun Tay
parent 4721d9dc48
commit 15f84d401e
3 changed files with 23 additions and 35 deletions

View file

@ -10,7 +10,6 @@ import React from 'react';
import DocsPaginator from '@theme/DocsPaginator'; // eslint-disable-line
import Head from '@docusaurus/Head';
import './styles.css';
import styles from './styles.module.css';
const Headings = ({headings, isChild}) => {

View file

@ -1,34 +0,0 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.anchor {
display: block;
position: relative;
top: -5rem;
}
@media only screen and (max-width: 735px) {
.anchor {
top: -10rem;
}
}
.hash-link {
position: absolute;
margin-left: -1.25rem;
padding-right: 1.25rem;
}
@media only screen and (min-width: 736px) {
.hash-link {
opacity: 0;
}
*:hover > .hash-link {
opacity: 1;
}
}

View file

@ -20,3 +20,26 @@ body {
--ifm-color-primary-light: #55dfc1 !important;
--ifm-color-primary-lighter: #55dfc1 !important;
}
.anchor {
display: block;
position: relative;
top: -5rem;
}
@media only screen and (max-width: 735px) {
.anchor {
top: -10rem;
}
}
.hash-link {
opacity: 0;
position: absolute;
margin-left: -1.25rem;
padding-right: 1.25rem;
}
*:hover > .hash-link {
opacity: 1;
}