glennw / servo-shell

Proof of concept HTML/CSS/JS browser UI for Servo
176 stars 16 forks source link

use system colors for the shell #6

Open flying-sheep opened 9 years ago

flying-sheep commented 9 years ago

UI should use system colors to integrate

jdm commented 9 years ago

@flying-sheep Want to file a corresponding issue in rust-cssparser to figure out how to support nonstandard properties like this? The idea of adding platform-specific code to https://github.com/servo/rust-cssparser/blob/master/src/color.rs#L99 to figure these values out isn't particularly appealing :)

flying-sheep commented 9 years ago

nonstandard? where did you get that idea from?

will do. and yeah, that doesn’t sound too clean given that it needs to be resolved at runtime (OS color themes can change at any time and differ between applications)

but there already is the special value Color::CurrentColor, so we’d just need to add 28 more special values.

and yeah, as said in the standard, we could use apperance instead, but i guess that’s more work… just think about what apparance: tab would imply instead of a simple color: WindowText; background: Window; border: 1px solid WindowFrame. besides, the current version of CSS3-UI has no mention of apperance, so the deprecation notice is pretty unhinged (deprecated in favor of something that was decided against?)

flying-sheep commented 9 years ago

fyi: the issue exists, and is the only currently open one: servo/rust-cssparser#2

jdm commented 9 years ago

Huh, TIL. For what it's worth, the TR/ specs should be ignored in favour of http://dev.w3.org/csswg/: http://dev.w3.org/csswg/css-color-3/#css-system, http://dev.w3.org/csswg/css-color/#system-colors, and http://dev.w3.org/csswg/css-ui-4/#appearance-switching

flying-sheep commented 9 years ago

yeah, but as i said there: appearance has only the “button” value, so it’s useless, and system colors are the closest to get a semblance of native appearance.

flying-sheep commented 1 year ago

That issue has been closed, system colors are back in the standard (not all of them, many individual ones have been deprecated):