W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2016

Re: [csswg-drafts] [css-color-4] backgroundColor

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Wed, 03 Aug 2016 02:16:47 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-237113468-1470190606-sysbot+gh@w3.org>
> Given Xidorn's reasoning in comment #???, I'm inclined to agree with
 closing this wontfix.

Which comment is that? This one 
where he says it can be done with variables?

I agree that technically it can be. However, in the case I'm working 
on, this wouldn't be practical. On a large project, the people 
responsible for content and the people responsible for UX/UI/Design 
are often not the same. The kind of shadow effect I was setting up 
falls under the UX side of things. On the other hand, setting the 
background of something might be done by UX people, but just as often 
it might also be done on a semi ad-hoc manner by people in charge of 
the content. If the two cannot coordinate, or if the content was 
written first, and the UX people are trying to deal with it, they 
cannot retroactively replace colors that have been hardcoded into the 
content with variables which they can then reuse.

Concretely, what I am trying to do is to write an additional 
stylesheet for W3C documents (old and new), and use the [shadow effect
 demoed here](http://jsbin.com/detezeb/edit?css,output) on a variety 
of potentially overflowing elements. But all sorts of specs have all 
sorts of custom background colors for various elements (notes, 
examples, warnings, various kinds of notices, IDL declarations, 
blockquotes, syntax highligthed code samples, non highlighted code 
samples, grammar definitions...), some shared across most of TR, many 
not. I cannot retroactively change these into variables, partly 
because the specs are frozen, partly because there's so many of them. 
This is what I ran into, but this is by no means unique to TR. If you 
were writing a theme for a blogging engine, you'd run into the same 
issue. Same thing If you were restyling MSDN or MDN or any large 
collection of documents.

In theory, you could use variables instead of the `em` unit if you 
were careful to set them up properly, but this would be a pain. Same 
thing for currentColor. We'd still want to have these even if 
variables had been invented earlier. I'd put backgroundColor in the 
same bucket. Less pressing than the first two, but still useful enough
 to expose IMO.

GitHub Notification of comment by frivoal
Please view or discuss this issue at 
using your GitHub account
Received on Wednesday, 3 August 2016 02:18:52 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:01 UTC