Improved styling of code annotations and fixed borders of code blocks in tabs

This commit is contained in:
squidfunk 2022-03-26 16:08:40 +01:00
parent c7cc8f07ab
commit 71dd84a0e9
5 changed files with 24 additions and 22 deletions

View File

@ -34,7 +34,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.9d5733d3.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.36ad6006.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}">

View File

@ -187,12 +187,12 @@
// Code block is the first child of a tab - remove margin and mirror
// previous (now deprecated) SuperFences code block grouping behavior
> pre:first-child,
> .highlight:first-child pre,
> .highlight:first-child > pre:first-child,
> .highlighttable:first-child {
margin: 0;
// Remove rounded borders
code {
> code {
border-start-start-radius: 0;
border-start-end-radius: 0;
}
@ -204,11 +204,6 @@
border-start-end-radius: 0;
}
// Code block result container is the second child
> .result:nth-child(2) {
margin-top: 0;
}
// Adjust spacing for nested tabbed container
> .tabbed-set {
margin: 0;

View File

@ -172,7 +172,6 @@
// alignment of text following an annotation.
&::after {
position: absolute;
top: 0.025em;
left: -0.126em;
z-index: -1;
// Hack: the first property is used as a fallback for older browsers
@ -209,9 +208,16 @@
}
}
// Annotation marker content
[data-md-annotation-id]::before {
// Annotation marker
[data-md-annotation-id] {
display: inline-block;
line-height: 90%;
// Annotation marker content
&::before {
display: inline-block;
padding-bottom: 0.1em;
vertical-align: 0.0625em;
transition: transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1);
content: attr(data-md-annotation-id);
@ -226,6 +232,7 @@
}
}
}
}
// Annotation index on focus/hover
:is(:focus-within, :hover) > & {