diff options
author | monikamaheshwari <monikamaheshwari1996@gmail.com> | 2019-04-27 09:15:22 -0400 |
---|---|---|
committer | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-04-27 09:15:22 -0400 |
commit | 0612246b04c12c10929f809c3c5a56da0780f0c1 (patch) | |
tree | ddfa1a4574f431744852943152482385e7dde7b3 /toolkit/components/reader | |
parent | 742f5aa24d7f65b14a5c32e2685a89d84613e970 (diff) | |
download | UXP-0612246b04c12c10929f809c3c5a56da0780f0c1.tar UXP-0612246b04c12c10929f809c3c5a56da0780f0c1.tar.gz UXP-0612246b04c12c10929f809c3c5a56da0780f0c1.tar.lz UXP-0612246b04c12c10929f809c3c5a56da0780f0c1.tar.xz UXP-0612246b04c12c10929f809c3c5a56da0780f0c1.zip |
Bug 1422680 - simplify aboutReader.css font-size classes using CSS variables r=Gijs
Diffstat (limited to 'toolkit/components/reader')
-rw-r--r-- | toolkit/components/reader/AboutReader.jsm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm index 6ec959eba..4cc9d6750 100644 --- a/toolkit/components/reader/AboutReader.jsm +++ b/toolkit/components/reader/AboutReader.jsm @@ -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); }, |