New issue
Advanced search Search tips

Issue 775189 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

CSS features can be controlled by origin trials

Project Member Reported by cha...@chromium.org, Oct 16 2017

Issue description

Allow CSS features to be enabled/disabled by an origin trial.

This could likely use a similar approach to RuntimeEnabledFeatures applied to a CSS feature. For example, if an origin trial introduces a new CSS tag, then the CSS parser could ignore the tag if no valid trial token is found (on the containing document).
 
Is this supposed to apply to CSS properties, or selectors, or both? (or value types, even, like the new 'q' unit?)

We'll also need to figure out what happens if a token for a css feature is applied via script after the document has loaded -- we'll probably have to do a full style recalc, if we can (unless we decide to just ignore script-added tokens)

Comment 2 by cha...@chromium.org, Oct 17 2017

We need to flush out the scope, desired behaviour and design. I was anticipating a design doc would be the best place to iterate on that, so I left the details sparse here.

With respect to the points raised:
- I expect any CSS feature exposed to web developers should be controllable via origin trial (i.e. "all of the above" to properties, selectors, value types, .etc). That assumes origin trial integration is technically feasible to implement, and there's predictable fallback behaviour for web developers.
- I'd say script-added tokens fall under the larger question of order/timing between reading/validating tokens and parsing/application of CSS. That is, we need to design predictable/explainable behaviour for web developers. If feasible, I'd like to see script-added tokens for CSS features handled as they are now. Currently, the web developer is responsible for adding the tokens as early as possible, before attempting to use the feature under trial. For CSS, I think we should avoid doing things like triggering full style recalc. 

Labels: -Pri-1 -M-64 Pri-2
Owner: ----
Status: Available (was: Assigned)
Design doc: https://docs.google.com/document/d/1Lc3U2WV38GZ3ShTAm3-p6fbZeGJGkxL-KZfWIQ-p8GU/edit#

Sign in to add a comment