Project

General

Profile

Feature #366

Improve Night Mode CSS

Added by Rayleigh Rayleigh about 2 months ago. Updated about 1 month ago.

Status:
New
Priority:
3.x
Start date:
01/02/2019
Due date:
% Done:

0%

Estimated time:

Description

Ever since leaving Firefox I miss having every website in a dark theme. I used Stylus and this: https://userstyles.org/styles/31267/global-dark-style-changes-everything-to-dark
style to do it, and I could do it without having to enable JavaScript.
Is it possible for Privacy Browser to do a similar thing, that is apply a dark theme without using JS? Also, if not, some inspiration could be taken from the aformentioned theme, seen as PB's theme doesn' really look good most of the time.

History

#1 Updated by Soren Stoutner about 2 months ago

  • Subject changed from Make dark theme better and work without JS. to Improve Night Mode CSS
  • Assignee set to Soren Stoutner

There is already a plan to allow Night Mode without JavaScript being enabled, but it cannot be implemented until after the release of Privacy WebView.

https://redmine.stoutner.com/issues/193

There is also a plan to let users customize the Night Mode CSS overrides, either globally or by domain.

https://redmine.stoutner.com/issues/272

#2 Updated by Soren Stoutner about 2 months ago

As described at https://www.stoutner.com/privacy-browser-2-6/, Night Mode uses the following CSS overrides:

* {
    background-color: #212121 !important;
    color: #BDBDBD !important;
    box-shadow: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    border: none !important;
}

a {
    color: #1565C0 !important;
}

If you have recommendations for changes to the default CSS I would be happy to consider them. They would need to work well with the majority of websites.

#3 Updated by Rayleigh Rayleigh about 2 months ago

Well, this (https://userstyles.org/styles/31267/global-dark-style-changes-everything-to-dark) theme is under CC BY-SA so I could take the CSS and modify it a bit to suit PB better.

It could also be done by just allowing the user to input their own theme, allowing a LOT of customisation.

#4 Updated by Soren Stoutner about 2 months ago

This CSS code is released under the CC BY-NC-SA, which can't be included in Privacy Browser because it is a commercial product.

As I already mentioned, there is a plan to let users customize the CSS used by Night Mode.

https://redmine.stoutner.com/issues/272

However, just creating a field where users can paste CSS is problematic. The CSS syntax is very specific and it is unlikely that most users could figure it out. I am not totally opposed to the idea, but it would result in a large number of bug reports and emails, which takes away from the limited time I have to dedicate to the development of Privacy Browser.

For example, the CSS code you linked to could not be used directly in Privacy Browser without being modified to remove the header and the regexp sections.

#5 Updated by Soren Stoutner about 1 month ago

  • Priority changed from 2.x to 3.x

Also available in: Atom PDF