Refactored targetted link offsets

This commit is contained in:
squidfunk 2017-04-22 00:22:40 +02:00 committed by Martin Donath
parent 45e57c29e2
commit fab1ab54d6
7 changed files with 35 additions and 14 deletions

22
.stylelintignore Normal file
View 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

File diff suppressed because one or more lines are too long

View File

@ -38,7 +38,7 @@
<script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script> <script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script>
{% endblock %} {% endblock %}
{% block styles %} {% 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 %} {% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-f78e5cb881.palette.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-f78e5cb881.palette.css">
{% endif %} {% endif %}

View File

@ -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 // Hide anchor for top-level heading, as it makes no sense
.headerlink { h1 .headerlink {
display: none; display: none;
} }
}
// Correct anchor offset for link blurring // Correct anchor offset for link blurring
@each $level, $delta in ( @each $level, $delta in (

View File

@ -114,7 +114,6 @@ hr {
&__inner { &__inner {
min-height: 100%; min-height: 100%;
padding-top: 2.4rem + 0.6rem; padding-top: 2.4rem + 0.6rem;
overflow: auto;
} }
} }

View File

@ -26,9 +26,6 @@
// Content container // Content container
.md-content { .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 // [tablet landscape +]: Add space for table of contents
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
@ -49,6 +46,14 @@
margin: 2.4rem; 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 // Hack: remove bottom spacing of last element, due to margin collapse
> :last-child { > :last-child {
margin-bottom: 0; margin-bottom: 0;