[csswg-drafts] [css-forms-1] Should the "minimal code" principle for appearance:base really be "minimal properties"? (#11978)

dbaron has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-forms-1] Should the "minimal code" principle for appearance:base really be "minimal properties"? ==
In the [design principles for `appearance: base`](https://drafts.csswg.org/css-forms-1/#basic-appearance-principles) there are two principles stated that interact with each other:
* 5.1.: They use minimal code and are easy to override.
* 6.: They are comprehensive:
  * 1.: Covering all states for each control.

The introduction to the list says that the earlier principles (5 in this case) are more important than the later ones (6 in this case).  This makes it seem like the "minimal code" principle overrides the "cover all states" principle, since covering all states requires a substantial amount of code with selectors for each state.

However, I think the important design principle of 5.1, whose goal I think is that the styles are easily overridable, isn't strictly minimal code, but rather minimal number of CSS properties used (and perhaps also clear separation of the purposes that they're used for).

In other words, I think it's fine to have a substantial amount of code where `button`, `button:enabled:hover`, `button:enabled:active`, `button:disabled` all have distinct declarations of the `background-color` property, and we shouldn't avoid that because the "minimal code" principle is more important than the "cover all states" principle.

This makes me thing we should reword the "minimal code" wording to be more specific about minimizing the things we care about minimizing.  I think one of these is the number of CSS properties used.  But there might also be something else here about consistency of the ways that they're used.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11978 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 21 March 2025 19:35:39 UTC