Re: [csswg-drafts] [css-cascade] What is the migration path for custom origins? (#4985)

The CSS Working Group just discussed `[css-cascade] What is the migration path for custom origins?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-cascade] What is the migration path for custom origins?<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/4985<br>
&lt;dael> miriam: Based on convo last time some of these issues maybe should be handled with bigger questions. Some discussion of TF or community group.<br>
&lt;dael> miriam: First one stands out as something we could get feedback on<br>
&lt;dael> miriam: If we're updating cascade how are they handled in terms of migration path<br>
&lt;dael> miriam: Issue explained by florian well. If syntax ignorable it's bad but hiding rules from old browsers they'll miss code<br>
&lt;dael> miriam: No solution in mind. Playing around I can mimic rough behavior using custom properties. Don't know if it gets us anywhere, but interesting I could mimic<br>
&lt;dael> miriam: Open to discussion on this<br>
&lt;dael> myles: What did custom prop do?<br>
&lt;dael> miriam: Create a stack of custom prop with fallback values. Each of those acts as a level of cascade so I can decide at which point in fallback stack I make a change. ANything more forward in the stack overrides anything further down. Allows me to pass in information from different intents I set up<br>
&lt;dael> miriam: I do use them in other ways we talked about for custom cascades.<br>
&lt;AmeliaBR> `var(--overridecolor, var(--themecolor, var(--defaultcolor)))`<br>
&lt;fremy> I find that idea very funny fwiw :)<br>
&lt;dael> astearns: florian since you just joined any feedback?<br>
&lt;dael> florian: I'll read offline and feedback later<br>
&lt;dael> AmeliaBR: miriam was introducing question on the migration path for custom origins and authors being about to write stylesheets that make sense in browsers that do and don't support<br>
&lt;dael> AmeliaBR: miriam had said it is both bad if old browsers treat declarations as normal and bad if they ignore the declarations (quoting florian ) Agree botha re true if they're required, but one solition is to make sure both things are available in that authors can write their code in a way so that things would fallback to be regular css cascade or write code so if custom origins not supported it's ignored<br>
&lt;dael> astearns: If we design such that old browsers can read but not have custom origins than we can do it and put things in @supports if want ignore in older<br>
&lt;dael> AmeliaBR: We'd need a way of doing an @supports rule that has that option if you don't understand don't use but also have a way thtat they syntax doesn't get blocked off as unrecognized/invalid. THe options gives authors flexibility about how initial behavior is and interacts with a polyfill that uses classes to create same effect<br>
&lt;dael> florian: One worry is if htere's a syntax that lets browser ignore and applya s if not custom origin this is fragile depending on who ships first. If dominant market doesn't ship there's a change people will put it in there and have it not work and than it'll be that we can't update. Not working may require polyfills b/c requires authors to be careful.<br>
&lt;dael> myles: Another strategy is JS. It could work.<br>
&lt;dael> fantasai: I think either way good to have @supports so people can figure out way to handle lack of support<br>
&lt;dael> fremy: It could work in JS, but in JS when all stylesheets loaded you look at all css rules, count IDs, and append notes with IDs. you can know in JS make IDs in a selector so you can create an origin that way<br>
&lt;fremy> s/append notes with IDs/append :not() with IDs/<br>
&lt;dael> florian: Thing iwth @supports is we have to use it as exists today and if we introduce a new @support syou have to wait for that. Depends on how proposal works out. Maybe a property to order and you test the property<br>
&lt;dael> fantasai: I think we should have a more solid proposal first. Have some kind of @supports but anything beyond it's not worth discussing in the abstract. I think this is a major feature so I don't think we should try best for backwards, we should try our best to make this as good as possible and than create fallback<br>
&lt;jensimmons> +1 to what fantasai just said<br>
&lt;fremy> I agree, polyfills are possible, I am not worried, so +1 to fantasai<br>
&lt;dael> miriam: Polyfills rely on this falling between existing origins and specificity. It's a bit harder if they interact with existing origins to polyfill.<br>
&lt;dael> astearns: Sounds like we keep this open and in consideration as we work on the feature and than answer once there's a more solid proposal.<br>
&lt;dael> miriam: sgtm.<br>
&lt;dael> miriam: Same true of other agenda items<br>
&lt;dael> astearns: Introduce them or skip?<br>
&lt;dael> miriam: Either<br>
&lt;dael> astearns: Why don't you introduce?<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4985#issuecomment-628103163 using your GitHub account

Received on Wednesday, 13 May 2020 16:29:36 UTC