css-mediaquery icon indicating copy to clipboard operation
css-mediaquery copied to clipboard

Add color-gamut and any-pointer support

Open Finesse opened this issue 4 years ago • 0 comments

In contrast to other media features, color-gamut and any-pointer can match multiple values at the same time. For example, if the user display supports DCI-P3, the following expressions will match:

  • (color-gamut: p3)
  • (color-gamut: srgb) (because DCI-P3 includes sRGB, so if a monitor supports DCI-P3, it does support sRGB)

And the following won't:

  • (color-gamut: rec2020)

In order to support this feature, the match function shall either take multiple values for a mocked property or have a built-in knowledge about these features (not applicable to any-pointer).

It will be handy if the library supports arbitrary media features. It will make it future proof (allow to use with forthcoming media features without updating).

Finesse avatar Jan 04 '21 00:01 Finesse