W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2019

Re: [csswg-drafts] [css-color-adjust-1] Combine forced-color-adjust and color-adjust properties somehow? (#3880)

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Sat, 27 Apr 2019 21:47:20 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-487322334-1556401639-sysbot+gh@w3.org>
In terms of the cascade, the questions (and my best guesses for answers) are:

- Would an author ever want to insist on exact color rendering for one situation but not the other?

  Yes.  If the author was turning off automatic forced-color adjustment to apply a more nuanced version of the system colors (e.g., for custom form controls or SVG diagrams), but the actual colors don't have specific meaning & could safely be adjusted when printing.  Or if the author cared about the aesthetics of their brand colors, but not to the point of overriding accessibility.

- Would an author want to toggle the values based on independent factors instead of setting both at once?

  Possibly, but I can't think of a good example.  Both controls are very much content-based; neither should be applied blindly as a global page style.

- Can the two be combined into a set of keywords that is intuitive to use?

  See below.

_______________________

Initial syntax for a combined `color-adjust` property, as a strawman:

```
<color-adjust>: any | never [ economy || forced ]?
```

`any` would be the default and would mean that the user agent can adjust colors whenever it deems that the change is in the user's best interest.

`never` on its own would mean "not unless the user very explicitly over-rides the page or print-preview styles".

The other keywords _combine_ with `never` to indicate the specific cases where the user agent should not make adjustments: 

- `never economy` means that the user agent should not adjust colors for print economy.

- `never forced` means that the user agent should not apply forced color values.

The list of specific situations could be extended in the future, which is why I also allowed `never economy forced` and `never forced economy` as valid declarations (currently equivalent to `never` on its own).

This arrangement is a little different from most CSS properties, because we want the default to be to allow everything, and we want authors to carefully think about which values they are disabling.

The downside is that authors might just use `never` everywhere because it is shorter, instead of thinking carefully about the situations they are disabling.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3880#issuecomment-487322334 using your GitHub account
Received on Saturday, 27 April 2019 21:47:21 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:59 UTC