Better heading spacings after a typography block

This commit is contained in:
Lucas 2020-09-12 10:56:24 +07:00
parent bf6edead86
commit e66bcdbce9
9 changed files with 348 additions and 119 deletions

View file

@ -180,25 +180,17 @@ h6 {
font-size: 1rem;
}
// Multi-level heading
hgroup {
margin-bottom: $spacing-typography;
*{
margin-bottom: 0;
}
> *:last-child {
color: var(--muted-text);
font-size: 1.125rem;
font-weight: normal;
}
}
// Paragraphs
p {
margin-bottom: $spacing-typography/2;
// Margin-top for headings after a typography block
address,
blockquote,
dl,
figure,
form,
ol,
p,
pre,
table,
ul {
& ~ h1 {
margin-top: $spacing-typography*2;
}
@ -224,6 +216,27 @@ p {
}
}
// Multi-level heading
hgroup {
margin-bottom: $spacing-typography;
*{
margin-bottom: 0;
}
> *:last-child {
color: var(--muted-text);
font-size: 1.125rem;
font-weight: normal;
}
}
// Paragraphs
p {
margin-bottom: $spacing-typography/2;
}
// Small
small {
font-size: 85%;