mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38: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);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue