Reputation: 64207
Do HTML/CSS/JavaScript define constants representing system theme colours? I mean those colours a user can define in the operating system (or a browser) control panel. Like standard window contents background and text colours etc.
The idea is to make a web site to respect the user preferences by default, showing light text on dark background in case the user uses such a theme in his system (while following the Occam's razor principle by avoiding introducing extra configuration).
Upvotes: 2
Views: 696
Reputation: 96587
CSS 2.1 specifies "System Colors":
In addition to being able to assign pre-defined color values to text, backgrounds, etc., CSS2 introduced a set of named color values that allows authors to specify colors in a manner that integrates them into the operating system's graphic environment.
Example:
to set the foreground and background colors of a paragraph to the same foreground and background colors of the user's window, write the following:
p { color: WindowText; background-color: Window }
In CSS Color Module Level 3, these system colors are deprecated, "in favor of the CSS3 UI ‘appearance
’ property". But it seems that this has been dropped, too (you can still find it in older drafts).
Upvotes: 1
Reputation: 20452
Yes you can,
Open firebug and change some css declaration like color : ActiveBorder or see webdesign.about.com/od/colorcharts/l/blsystemcolors.htm or search the net for 'css system colors'
For a better reference suggested by unor about system colors
Upvotes: 6