- From: Thomas Steiner <notifications@github.com>
- Date: Thu, 16 Sep 2021 01:03:21 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/632/920679995@github.com>
> @plinss, @cynthia and myself did another review of this during our Gethen vf2f. First of all, thank you for following up on with your security team and getting an LGTM from them. I personally won't push on this further given it's already captured. Thanks for the review and the always helpful comments! > Another issue with this proposal is the affect it has to existing styling patterns. All conditional styling today takes place on the client as a result of style recalc in combination of various environment changes - color scheme, reduced motion, transparency etc. Exposing this through client hints will promote such conditional handling on the server side which will arguably negate some of the perf wins described and also require that state is kept on the server side. Ex. UA navigates to a.com in light mode exposed in the client hints. The server provides a light version of style.css and appropriate other content. The mode changes to dark in the same session - the server needs to recognize the change and this implies the client needs to reload possibly all the resources. This proposal solves the first request problem. The user changing themes afterward is always expected to require new resources. These could have been pre-loaded proactively during idle time of the page, or be fetched lazily on-demand. It does not interfere with client-side handling at all, for example in patterns like the following: ```html <link rel="stylesheet" href="dark.css" media="(prefers-color-scheme: dark)" /> <link rel="stylesheet" href="light.css" media="(prefers-color-scheme: light)" /> ``` For performance reasons, the server could have inlined `dark.css` based on `Sec-CH-Prefers-Color-Scheme: dark`, and then only add the `<link rel="stylesheet" href="light.css" media="(prefers-color-scheme: light)" />` in the server-generated source code, so loading of `light.css` would work on-demand. > Finally, I don't believe CSSWG is the appropriate venue for this work. It is the right place to define media capabilities, not client hints. Understood. We'll evaluate other options then. [`Device-Memory`](https://w3c.github.io/device-memory/#sec-device-memory-client-hint-header) is edited by the [Web Performance WG](https://www.w3.org/webperf/), which, @yoavweiss, might be an appropriate venue?! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/632#issuecomment-920679995
Received on Thursday, 16 September 2021 08:03:33 UTC