Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
You must create an account or log in to edit.

Template:Centered headers/styles.css: Difference between revisions

Template page
Content deleted Content added
No edit summary
No edit summary
Line 9: Line 9:
display: flex;
display: flex;
flex-wrap: nowrap;
flex-wrap: nowrap;
justify-content: flex-start;
justify-items: center;
align-items: center;
align-items: center;
gap: var(--space-md);
gap: var(--space-md);
Line 19: Line 19:
text-align: center;
text-align: center;
font-weight: bold;
font-weight: bold;
/* only shrink */
/* no changes */
flex: 0 1 auto;
flex: none;
}
}


Line 52: Line 52:
/* only grow, minimum 2rem */
/* only grow, minimum 2rem */
flex: 1 0 2rem;
flex: 1 0 2rem;
}

h2::before,
h3::before {
justify-self: start;
}

h2::after,
h3::after {
justify-self: end;
}
}

Revision as of 21:40, 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;
	justify-items: center;
	align-items: 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 {
	justify-self: start;
}

h2::after,
h3::after {
	justify-self: end;
}