hugo-book-theme/assets/_markdown.scss

86 lines
1.4 KiB
SCSS

@import 'variables';
$block-border-radius: 0.15rem;
.markdown {
line-height: 1.6;
h1, h2, h3, h4, h5 {
font-weight: normal;
line-height: 1;
margin-top: 1.5em;
margin-bottom: $padding-16;
}
// remove padding at the beginning of page
> :first-child {
margin-top: 0;
}
b, optgroup, strong {
font-weight: bolder;
}
a {
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
img {
max-width: 100%;
}
code {
padding: 0 $padding-4;
background: $gray-100;
border-radius: $block-border-radius;
}
pre {
padding: $padding-16;
background: $gray-100;
border-radius: $block-border-radius;
font-size: .875em;
overflow-x: auto;
code {
padding: 0;
background: none;
}
}
blockquote {
border-left: $padding-1*2 solid $gray-300;
margin: $padding-16 0;
padding: $padding-1 $padding-16;
:first-child { margin-top: 0; }
:last-child { margin-bottom: 0; }
}
table {
border-spacing: 0;
border-collapse: collapse;
margin-top: $padding-16;
margin-bottom: $padding-16;
tr th, tr td {
padding: $padding-8 $padding-16;
line-height: 1;
border: $padding-1 solid $gray-200;
}
tr:nth-child(2n) {
background: $gray-100;
}
}
hr {
height: $padding-1;
border: none;
background: $gray-200;
}
}