TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

CSS System Colors (2021)

141 pointsby bookstore-romeoabout 2 years ago

7 comments

xp84about 2 years ago
Really a big fan of the underlying theme (no pun intended) here which is that your website or webapp <i>should</i> care significantly more about visually fitting in with the user&#x27;s system, settings, and preferences than it should about expressing your corporate branding and looking the same on every device in the world. Users don&#x27;t care about your &quot;brand colors&quot; and every &quot;unique&quot; UI element only serves to make their task of learning your site more annoying.<p>In my career I have rarely run across anyone trusted to make visual design calls who is humble enough to agree with the above. Two different shades of black depending on which browser the user chooses? &quot;Quick, file a bug!&quot;
评论 #35294416 未加载
jacobmarbleabout 2 years ago
Looks like support for &quot;system colors&quot; is up to 96% in 2023:<p><a href="https:&#x2F;&#x2F;caniuse.com&#x2F;mdn-css_types_color_system-color" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;mdn-css_types_color_system-color</a>
评论 #35292341 未加载
评论 #35294727 未加载
评论 #35290275 未加载
评论 #35289640 未加载
graypeggabout 2 years ago
The CSS spec is always interesting for how much very useful stuff there is in it that’s buried under a magic incantation. I mean that as in, there’s little in the syntax to hint at the fact that Canvas as a colour exists.<p>Some colours are camelCase (currentColor), others are uncased (rebeccapurple) and I guess these system colours are TitleCase? (CanvasText)<p>I guess you just need to know!
评论 #35292203 未加载
评论 #35292766 未加载
评论 #35292518 未加载
sbussardabout 2 years ago
I’m mid 30s and have been writing front end code since the late 90s and it never ceases to amaze me how straightforward and easy it has become. When XMLHttpRequest came out it felt like a HUGE hack to load stuff that wasn’t xml. In fact the only way to have a half decent website was to use an arsenal of hacks because browsers sucked
ahoyabout 2 years ago
CSS is so cool, I&#x27;ve been writing it for a decade and I still keep leaning new, interesting things. Ty for sharing this!
评论 #35291830 未加载
schemescapeabout 2 years ago
I’ll look at the stylesheet later, but how are they avoiding links on iOS being dark blue on a dark background?<p>iOS’s default “dark” stylesheet is, unfortunately, not usable, and I’ve wondered if there’s a workaround that doesn’t involve me hard-coding specific colors.<p>Edit: relevant WebKit bug: <a href="https:&#x2F;&#x2F;bugs.webkit.org&#x2F;show_bug.cgi?id=209851" rel="nofollow">https:&#x2F;&#x2F;bugs.webkit.org&#x2F;show_bug.cgi?id=209851</a>
评论 #35296283 未加载
1xdevloperabout 2 years ago
This color-scheme property came in handy when I was implementing a modal dialog containing an iframe and a semi-transparent backdrop.