mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Refactored targetted link offsets
This commit is contained in:
parent
45e57c29e2
commit
fab1ab54d6
22
.stylelintignore
Normal file
22
.stylelintignore
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Don't line shame
|
||||
src/assets/stylesheets/_shame.scss
|
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/application-c5315243ec.css
Normal file
1
material/assets/stylesheets/application-c5315243ec.css
Normal file
File diff suppressed because one or more lines are too long
@ -38,7 +38,7 @@
|
||||
<script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script>
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-b1a1975878.css">
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-c5315243ec.css">
|
||||
{% if config.extra.palette %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-f78e5cb881.palette.css">
|
||||
{% endif %}
|
||||
|
@ -80,15 +80,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Correct headline offset with padding due to margin layering
|
||||
h1 {
|
||||
padding-top: 0.8rem;
|
||||
|
||||
// Hide anchor for top-level heading, as it makes no sense
|
||||
.headerlink {
|
||||
h1 .headerlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Correct anchor offset for link blurring
|
||||
@each $level, $delta in (
|
||||
|
@ -114,7 +114,6 @@ hr {
|
||||
&__inner {
|
||||
min-height: 100%;
|
||||
padding-top: 2.4rem + 0.6rem;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,6 @@
|
||||
|
||||
// Content container
|
||||
.md-content {
|
||||
// Hack: setting overflow to hidden induces new layer borders which omits
|
||||
// massive repaints because of the margins of the inner elements
|
||||
overflow: hidden;
|
||||
|
||||
// [tablet landscape +]: Add space for table of contents
|
||||
@include break-from-device(tablet landscape) {
|
||||
@ -49,6 +46,14 @@
|
||||
margin: 2.4rem;
|
||||
}
|
||||
|
||||
// Hack: add pseudo element for spacing, as the overflow of the content
|
||||
// container may not be hidden due to an imminent offset error on targets
|
||||
&::before {
|
||||
display: block;
|
||||
height: 0.8rem;
|
||||
content: "";
|
||||
}
|
||||
|
||||
// Hack: remove bottom spacing of last element, due to margin collapse
|
||||
> :last-child {
|
||||
margin-bottom: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user