[gnome-books] epubview: Make night mode background colour override everything



commit 69e4761d2c5aac43169907cd32ee4824ba3780cb
Author: IBBoard <dev ibboard co uk>
Date:   Sat Apr 27 16:38:38 2019 +0100

    epubview: Make night mode background colour override everything
    
    Using "!important" is normally a bad thing on web pages (because
    it overrides normal specificity rules) but in this case it is
    necessary because No Starch Press and Wiley books set a
    `background-color: transparent;` rule that isn't overridden
    otherwise.
    
    Closes: #22

 src/epubview.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/epubview.js b/src/epubview.js
index b90aaf6f..283a61ab 100644
--- a/src/epubview.js
+++ b/src/epubview.js
@@ -71,7 +71,7 @@ var EPUBView = new Lang.Class({
         let view = new Gepub.Widget();
 
         this.invertedStyle = new WebKit2.UserStyleSheet(
-            'body { background: black; filter: invert(100%); }',
+            'body { background: black !important; filter: invert(100%); }',
             WebKit2.UserContentInjectedFrames.ALL_FRAMES,
             WebKit2.UserStyleLevel.USER,
             null, null,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]