Re: [csswg-drafts] proposal: [CSS-cascade] import only in moment when we need it.

The CSS Working Group just discussed `CSS Cascade`.

<details><summary>The full IRC log of that discussion</summary>
&lt;gregwhitworth> Topic: CSS Cascade<br>
&lt;gregwhitworth> TabAtkins: Did I add this?<br>
&lt;gregwhitworth> TabAtkins: ok ok ok<br>
&lt;gregwhitworth> TabAtkins: ah<br>
&lt;gregwhitworth> TabAtkins: people want to only be able to import styles based on MQs<br>
&lt;jensimmons> link?<br>
&lt;gregwhitworth> TabAtkins:  but for reasons, we don't actually block downloading<br>
&lt;gregwhitworth> TabAtkins: we have to go down the styles<br>
&lt;gregwhitworth> TabAtkins: the web depends on them being walked<br>
&lt;Rossen> github: https://github.com/w3c/csswg-drafts/issues/3050<br>
&lt;gregwhitworth> TabAtkins: so, people still want this<br>
&lt;gregwhitworth> TabAtkins: leave the downloads only for devices that need them, etc<br>
&lt;gregwhitworth> TabAtkins: @supports is a good example of this<br>
&lt;gregwhitworth> TabAtkins: the proposal - the two that I have are either a: keyword like async after url()<br>
&lt;gregwhitworth> TabAtkins: this indicates the stylesheet can be loaded async<br>
&lt;gregwhitworth> TabAtkins: or we can add a media function similar to supports, the old will be forced function but this one will only occur when the method is satisfied<br>
&lt;gregwhitworth> TabAtkins: does this seems like a good possilbities, if so which do you prefer?<br>
&lt;gregwhitworth> myles: kind of like device width, if you resize the browser it will only fetch as you resize<br>
&lt;gregwhitworth> TabAtkins: yes, it's bad to put it on things that are likely to change<br>
&lt;gregwhitworth> heycam: I think it seems reasonable to add support for this - the media function doesn't seem like the best approach<br>
&lt;gregwhitworth> heycam: for print I'm not even sure<br>
&lt;gregwhitworth> heycam: you hit cntrl+p and having to print<br>
&lt;gregwhitworth> heycam: do you have any other scenarios<br>
&lt;gregwhitworth> jensimmons: I'm very skeptical about this<br>
&lt;gregwhitworth> jensimmons: I think it's a thing we want to think about deeply<br>
&lt;gregwhitworth> jensimmons: there are many ways that people do to make it so that it's faster<br>
&lt;emilio> q+<br>
&lt;gregwhitworth> jensimmons: some of them are terrible<br>
&lt;emilio> o rly?<br>
&lt;gregwhitworth> jensimmons: some of them make far more CSS, I'm not sure of anything but we don't want to do it too quickly<br>
&lt;astearns> zakim, open queue<br>
&lt;Zakim> ok, astearns, the speaker queue is open<br>
&lt;gregwhitworth> jensimmons: offering the tool - it will have a huge impact on how people work with CSS<br>
&lt;gregwhitworth> jensimmons: now the industry is straining about CSS performance and it's getting kind of scary<br>
&lt;gregwhitworth> jensimmons: it's something we really want to explore - but we should dig into all of the aspects and not ship too quickly when the industry moves to a different approach that negates the investments here<br>
&lt;gregwhitworth> emilio: why do we need to add import instead of link<br>
&lt;gregwhitworth> TabAtkins: right now link rel=stylesheet doesn't have async<br>
&lt;gregwhitworth> TabAtkins: whatever changes we have here we'll want to port over there as well<br>
&lt;gregwhitworth> jensimmons: you know what I might be saying is that I want to engage with a CG with more webdevs<br>
&lt;gregwhitworth> emilio: we rely on import, and others rely on that<br>
&lt;gregwhitworth> emilio: ...<br>
&lt;gregwhitworth> TabAtkins: one thing I'm running into - this might want to be, more complicated<br>
&lt;gregwhitworth> TabAtkins: rather than just @supports<br>
&lt;gregwhitworth> TabAtkins: and import stays how it is<br>
&lt;gregwhitworth> emilio: what is the context of why?<br>
&lt;gregwhitworth> emilio: why do we load print stylesheets even if we aren't printing<br>
&lt;gregwhitworth> TabAtkins: the reason we do it now is because people expect this to be the way it always has been<br>
&lt;gregwhitworth> TabAtkins: back in the day we didn't have promises for these types of things<br>
&lt;gregwhitworth> TabAtkins: this will avoid some of our issues<br>
&lt;gregwhitworth> TabAtkins: this is getting more complicated - let's WICG it, let's do what jen said<br>
&lt;gregwhitworth> TabAtkins: that sounds reasonable to me<br>
&lt;gregwhitworth> emilio: there is a way to do this in webkit, the .disable factory<br>
&lt;gregwhitworth> emilio: it won't load it<br>
&lt;gregwhitworth> emilio: it feels like I've filed various issues on that<br>
&lt;gregwhitworth> emilio: if we could agree on that - we could get web developers ideas on it, no need for something new<br>
&lt;gregwhitworth> TabAtkins: that functionality doesn't work on import<br>
&lt;gregwhitworth> emilio: I was hoping to not have to do this on import<br>
&lt;gregwhitworth> TabAtkins: yeah we should though<br>
&lt;gregwhitworth> emilio: we don't support all security on that either<br>
&lt;gregwhitworth> TabAtkins: we should<br>
&lt;gregwhitworth> Resolved: Move this to WICG<br>
</details>


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

Received on Tuesday, 23 October 2018 13:44:26 UTC