Template:Fraction/styles.css: Difference between revisions

From Vigyanwiki
< Template:Fraction
Template>DannyS712
m (DannyS712 moved page Template:Frac/styles.css to Template:Fraction/styles.css without leaving a redirect: requested move; consensus at Template talk:Fraction (redirect suppressed per WP:PMRC#4))
Template>Izno
(per rexx's changes)
Line 4: Line 4:
}
}


.frac .num {
.frac .num,
.frac .den {
font-size: 80%;
font-size: 80%;
    vertical-align: super;
line-height: 0; /* we want this inline */
vertical-align: super;
}
}


.frac .den {
.frac .den {
font-size: 80%;
vertical-align: sub;
    vertical-align: sub;
}
}


Line 33: Line 34:
}
}


/* [[Template:Screen reader-only]] is canonical implementation */
/* [[Template:Screen reader-only]] is canonical implementation onwiki */
.sr-only {
.sr-only {
border: 0;
border: 0;

Revision as of 00:20, 28 April 2021

.frac,
.sfrac {
	white-space: nowrap;
}

.frac .num,
.frac .den {
	font-size: 80%;
	line-height: 0; /* we want this inline */
	vertical-align: super;
}

.frac .den {
	vertical-align: sub;
}

.sfrac.tion,
.sfrac .tion {
	display: inline-block;
	vertical-align: -0.5em;
	font-size: 85%;
	text-align: center;
}

.sfrac .num,
.sfrac .den {
	display: block;
	line-height: 1em;
	margin: 0 0.1em;
}

.sfrac .den {
	border-top: 1px solid;
}

/* [[Template:Screen reader-only]] is canonical implementation onwiki */
.sr-only {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	/* white-space: nowrap; /* already have nowrap above */
}