‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, September 3, 2020 11:19 PM, John Blinka <john.bli...@gmail.com> 
wrote:

> Could you elaborate on this?  Don’t know css, but could pick it up.  I’m
> assuming that web pages already contain css code to direct their
> appearance. 

yes.

> So you apparently have some alternate appearance you prefer,
> with your own alternate coding, and you somehow tell the browser to use
> yours instead.  Am I anywhere close to getting the broad outlines of the
> process correct? 

correct.  we basically create a custom css
file, with colors defined for various html
tags/elements as per our preference.

we then hand the browser that css file, and tell
it "after you load the site, add our custom css,
and overwrite whatever the site originally
wanted".

the way to do this, we add "!important" in our new
css.  "!important" will make the overwrite.
here is an example of such css with "!important":

    
https://github.com/alphapapa/solarized-everything-css/blob/master/css/solarized-dark/solarized-dark-all-sites.css

this is how i look at it.  maybe some gurus can
further elaborate on this with better technical
correctness.


> If so, how does this intercept and substitute process
> work?  (I see you provide a link below, but it doesn’t work here...)

with firefox/chrome there is "stylish"
plugin/add-on.  i don't know how it is today, of
if there is any better ones.  i used to use them
several years in the past.  you basically select
the css you want to use to overwrite site's css.

with qutebrowser, i added these in my config.py
file:

    c.aliases['style-none'] = 'config-unset -t content.user_stylesheets'
    c.aliases['style-night'] = 'set -t content.user_stylesheets night.css'
    c.aliases['style-wiki'] = 'set -t content.user_stylesheets wiki.css'

where "night.css" and "wiki.css" are names of user
style sheets that i downloaded from the web

here "style-none", "style-night", ..., are nothing
but commands in qutebrowser, that you execute by
typing ":COMMAND".  so if i want to activate night
mode, i type ":style-night" without double quotes,
then the whole thing becomes dark bg with white
fg.  of course qutebrowser has tab completion, so
i don't need to type full thing.  e.g. usually i
just type ":sty<tab><tab>..." until i pick one i
want.

of course you can add as many as you want.
since different ones work better for different
sites.

there, i added "style-wiki" that's specifically
made for wikipedia.  i got it from userstyles.org
years ago before it was so slow.


> Not promising.  The page doesn’t load except for a rotating colorwheel in
> the center followed by a 504 gateway timeout.  Will try again later.

yes.  sadly https://userstyles.org/ is now too
slow and doomed with excess javascript.  it was
not like this some years ago.

either way, you can obtain those css files by
other means (not limited to userstyles.org).  e.g.
google for them around, or even make your own.


Reply via email to