mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-28 01:10:58 +01:00
Added basic support for line anchors
This commit is contained in:
parent
3c4c8dce9c
commit
16939c16ae
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/main.52c8dc4b.min.css.map
Normal file
1
material/assets/stylesheets/main.52c8dc4b.min.css.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.956c2c2d.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.52c8dc4b.min.css' | url }}">
|
||||
{% if config.theme.palette %}
|
||||
{% set palette = config.theme.palette %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.9204c3b2.min.css' | url }}">
|
||||
|
@ -136,7 +136,9 @@ markdown_extensions:
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
- pymdownx.highlight
|
||||
- pymdownx.highlight:
|
||||
line_spans: __codeline
|
||||
anchor_linenums: True
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.keys
|
||||
- pymdownx.magiclink:
|
||||
|
@ -200,6 +200,14 @@
|
||||
content: attr(data-linenos);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
// Code block line anchors - Chrome and Safari seem to have a strange bug
|
||||
// where scroll margin is not applied to anchors inside code blocks. Setting
|
||||
// positioning to absolute seems to fix the problem. Interestingly, this does
|
||||
// not happen in Firefox.
|
||||
code a[id] {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -267,6 +275,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Code block line numbers container
|
||||
.linenodiv a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Scoped in typesetted content to match specificity of regular content
|
||||
|
Loading…
Reference in New Issue
Block a user