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 23: Line 23:
}
}


/* solid line for h2 */
/* solid line around h2 */
h2::before,
h2::before,
h2::after {
h2::after {
content: '';
content: '';
border-top: 1px solid var(--color-base--emphasized);
border-top: 1px solid var(--color-base--emphasized);
/* only grow, minimum 3vw */
flex: 1 0 3vw;
}
}


/* dashed line for h3 */
/* dashed line around h3 */
h3::before,
h3::before,
h3::after {
h3::after {
content: '';
content: '';
border-top: 1px dashed var(--color-base--emphasized);
border-top: 1px dashed var(--color-base--emphasized);
/* only grow, minimum 3vw */
flex: 1 0 3vw;
}
}


/* phones */
@media (min-width: 320px) {
@media (min-width: 320px) {
h2 .mw-headline {
h2 .mw-headline {
Line 48: Line 45:
h3 .mw-headline {
h3 .mw-headline {
font-size: 2.5vh;
font-size: 2.5vh;
}
/* lines around h2, h3 */
h2::before,
h2::after,
h3::before,
h3::after {
/* only grow, minimum 5vw */
flex: 1 0 5vw;
}
}
}
}


/* tablets */
@media (min-width: 640px) {
@media (min-width: 640px) {
h2 .mw-headline {
h2 .mw-headline {
Line 58: Line 65:
h3 .mw-headline {
h3 .mw-headline {
font-size: 2.25vh;
font-size: 2.25vh;
}

/* lines around h2, h3 */
h2::before,
h2::after,
h3::before,
h3::after {
/* only grow, minimum 2vw */
flex: 1 0 2vw;
}
}
}
}


/* pc */
@media (min-width: 1120px) {
@media (min-width: 1120px) {
h2 .mw-headline {
h2 .mw-headline {
Line 68: Line 85:
h3 .mw-headline {
h3 .mw-headline {
font-size: 3vh;
font-size: 3vh;
}
/* lines around h2, h3 */
h2::before,
h2::after,
h3::before,
h3::after {
/* only grow, minimum 3vw */
flex: 1 0 3vw;
}
}
}
}

Revision as of 16:34, December 3, 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-content: flex-start;
	align-items: center;
	gap: var(--space-md);
}

h2 .mw-headline,
h3 .mw-headline {
	/* typography for header */
	text-align: center;
	font-weight: bold;
	/* only shrink */
	flex: 0 1 auto;
}

/* 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);
}

/* phones */
@media (min-width: 320px) {
	h2 .mw-headline {
		font-size: 4vh;
	}
	
	h3 .mw-headline {
		font-size: 2.5vh;
	}
	
	/* lines around h2, h3 */
	h2::before,
	h2::after,
	h3::before,
	h3::after {
		/* only grow, minimum 5vw */
		flex: 1 0 5vw;
	}
}

/* tablets */
@media (min-width: 640px) {
	h2 .mw-headline {
		font-size: 3.5vh;
	}
	
	h3 .mw-headline {
		font-size: 2.25vh;
	}

	/* lines around h2, h3 */
	h2::before,
	h2::after,
	h3::before,
	h3::after {
		/* only grow, minimum 2vw */
		flex: 1 0 2vw;
	}
}

/* pc */
@media (min-width: 1120px) {
	h2 .mw-headline {
		font-size: 4.5vh;
	}
	
	h3 .mw-headline {
		font-size: 3vh;
	}
	
	/* lines around h2, h3 */
	h2::before,
	h2::after,
	h3::before,
	h3::after {
		/* only grow, minimum 3vw */
		flex: 1 0 3vw;
	}
}