Apply stylish to all websites, but NOT a browser

I want to apply a stylish theme to all inpux fields, text fields and selection fields, so I wrote:

@namespace url(http://www.w3.org/1999/xhtml); textarea, input, select { background-color: white !important; color: black !important; } 

I understand that this only applies to web pages, but it also affects the URL bar, turning it white. Is there a way to make it not affect the URL bar?

I am using Firefox Nightly (version 43).

Update

If you want GTK3 Firefox to look right with a dark theme, the final solution is a stylish configuration with:

 @namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix('http://'), url-prefix('https://') { textarea, input, select { background-color: white !important; color: black !important; } } 

It works like a charm.

+5
source share
1 answer

Firefox uses a combination of XUL and HTML for its chrome, so the default CSS namespace declaration also affects HTML elements from the browser. You can wrap your style in the @-moz-document block, restricting the origin of the target content, for example:

 @-moz-document url-prefix('http://'), url-prefix('https://') { /* your code here */} 
+5
source

Source: https://habr.com/ru/post/1233721/


All Articles