|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
referencing system colors/fonts from css
I'm looking for a way to reference the used system colors (and fonts) in css.
Here's the situation: I've create some context menu's (the right-click menu's in a browser). The browser generated context menu's, say when right-clicking on a link, show you some options using a particular style: colors, fonts, padding, etc. I'd like to be able to use these already defined/installed style definitions. But how do you reference these in a stylesheet? I know I can use a color picker to figure out the color scheme of a default browser look. But, since a lot of people use skins or themes, I'd like to use the colors and fonts used in the active skin, to keep the context menu in line with the rest of the look and feel. Does anyone know a way how to read or use these particular style settings? Any suggestion, tip, link is appreciated. Jeroen |
|
#2
|
|||
|
|||
|
You're looking for the CSS2 system colors, a collection of about two dozen keywords that describe colors defined by the user's system.
Ref: system colors @w3c.org |
|
#3
|
|||
|
|||
|
Thanks, that's the list I was looking for!
However, it looks as if Mozilla skins/themes don't set these pre-defined colors, or use more than these. I haven't thoroughly checked it yet, but I'll get there... Jeroen |
|
#4
|
|||
|
|||
|
You're right, the skins won't set the colors, because they're properties of the operating system, not the browser. That is, all those colors are the default ones that any application should use if they don't wish to provide their own color scheme. If an application is skinned or themed in any way (as is mozilla), those color properties won't be affected.
They're most useful when writing application level programs (that is, executables) that use web-pages. You can write pages that inherit their colors from the operating system, making the pages more seamless with the rest of the operating system. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > referencing system colors/fonts from css |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|