fv0 / native-ui

macOS theme for the Atom code editor. Over 205k downloads.
https://atom.io/themes/native-ui
140 stars 23 forks source link

System colors #56

Closed simurai closed 8 years ago

simurai commented 8 years ago

So @kevinSuttle dug up this old (2009!) post about using the system colors in CSS. And the cool part is that it adapts to the changes in the settings:

colors

CodePen Demo

Might be neat to use them in this theme?

kevinSuttle commented 8 years ago

Works.

electron-css-system-properties

fv0 commented 8 years ago

This looks very cool. Thanks to both of you. I'll implement this and test it. That would be a great step forward.

fv0 commented 8 years ago

Closed because not cross-platform compatible.

kevinSuttle commented 8 years ago

Can you explain that?

fv0 commented 8 years ago

@kevinSuttle I can’t imagine that the colors appear exactly the same on every OS. What do you think?

kevinSuttle commented 8 years ago

They don't appear the same, no.

simurai commented 8 years ago

You could scope it to only macOS with the .platform-darwin class.

.selected {
  background-color: @background-color-selected; // fallback
}

.platform-darwin .selected {
  color: HighlightText;
  background-color: Highlight;
}

but not sure.. maybe that's too much work to maintain for many 3rd party packages.

fv0 commented 8 years ago

@simurai Yes, I agree with that. Thanks for your feedback. I think it could turn out as a problem to maintain in the long run. These are just some of the limitations that we’ll have to accept since Atom itself is not a native Mac app and therefore can’t fully behave like one. The tab dragging behavior was a similar request that couldn’t be fulfilled without extensive Javascript fiddling.