mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Bug 1422680 - simplify aboutReader.css font-size classes using CSS variables r=Gijs
This commit is contained in:
parent
a0ceaeace8
commit
deed413b53
2 changed files with 5 additions and 42 deletions
|
|
@ -276,13 +276,10 @@ AboutReader.prototype = {
|
|||
},
|
||||
|
||||
_setFontSize(newFontSize) {
|
||||
let containerClasses = this._containerElement.classList;
|
||||
|
||||
if (this._fontSize > 0)
|
||||
containerClasses.remove("font-size" + this._fontSize);
|
||||
|
||||
this._fontSize = newFontSize;
|
||||
containerClasses.add("font-size" + this._fontSize);
|
||||
let size = (10 + 2 * this._fontSize) + "px";
|
||||
|
||||
this._containerElement.style.setProperty("--font-size", size);
|
||||
return AsyncPrefs.set("reader.font_size", this._fontSize);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -47,44 +47,10 @@ body.serif .remove-button {
|
|||
}
|
||||
|
||||
.container {
|
||||
--font-size: 12;
|
||||
max-width: 30em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.container.font-size1 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.container.font-size2 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.container.font-size3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.container.font-size4 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.container.font-size5 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.container.font-size6 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.container.font-size7 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.container.font-size8 {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.container.font-size9 {
|
||||
font-size: 28px;
|
||||
font-size: var(--font-size);
|
||||
}
|
||||
|
||||
.container.content-width1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue