Template:Centered headers/styles.css: Difference between revisions
Template page
More actions
Content deleted Content added
Tesinormed (talk | contribs) No edit summary |
Tesinormed (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
display: flex; |
display: flex; |
||
flex-wrap: nowrap; |
flex-wrap: nowrap; |
||
| ⚫ | |||
align-items: center; |
align-items: center; |
||
| ⚫ | |||
gap: var(--space-md); |
gap: var(--space-md); |
||
} |
} |
||
| Line 56: | Line 56: | ||
h2::before, |
h2::before, |
||
h3::before { |
h3::before { |
||
margin-right: auto; |
|||
} |
} |
||
h2::after, |
h2::after, |
||
h3::after { |
h3::after { |
||
margin-left: auto; |
|||
} |
} |
||
Revision as of 21:44, December 9, 2024
/* hide the edit section button */
h2 .mw-editsection,
h3 .mw-editsection {
display: none;
}
/* flex container to allow for the lines on each side */
h2, h3 {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
gap: var(--space-md);
}
h2 .mw-headline,
h3 .mw-headline {
/* typography for header */
text-align: center;
font-weight: bold;
/* no changes */
flex: none;
}
/* solid line around h2 */
h2::before,
h2::after {
content: '';
border-top: 1px solid var(--color-base--emphasized);
}
/* dashed line around h3 */
h3::before,
h3::after {
content: '';
border-top: 1px dashed var(--color-base--emphasized);
}
h2 .mw-headline {
font-size: var(--font-size-xxx-large);
}
h3 .mw-headline {
font-size: var(--font-size-x-large);
}
/* lines around h2, h3 */
h2::before,
h2::after,
h3::before,
h3::after {
/* only grow, minimum 2rem */
flex: 1 0 2rem;
}
h2::before,
h3::before {
margin-right: auto;
}
h2::after,
h3::after {
margin-left: auto;
}