16:07:00 RRSAgent has joined #css 16:07:05 logging to https://www.w3.org/2025/01/29-css-irc 16:07:05 RRSAgent, make logs Public 16:07:06 Meeting: Cascading Style Sheets (CSS) Working Group Teleconference 16:08:11 alisonmaher has joined #css 16:08:21 present+ 16:09:03 present+ 16:09:07 scribenick emilio 16:09:17 present+ 16:09:37 kschmi has joined #css 16:09:41 present+ 16:10:01 we are finding that the Apple desks do not allow Apple power adapters to plug in to them 16:10:42 present+ 16:10:44 present+ 16:10:50 ydaniv has joined #css 16:11:05 present+ 16:11:22 present+ 16:11:27 present+ 16:12:42 present+ 16:13:07 present+ 16:14:37 Present+ 16:18:32 There was the `@sheet` proposal on the morning agenda (https://github.com/w3c/csswg-drafts/issues/11509), Simon didn't express specific interest in it. Should we use some of the early session to discuss that perhaps if we're out of working mode topics? 16:18:38 ntim has joined #css 16:18:48 ntim has left #css 16:19:06 ntim has joined #css 16:19:12 present+ 16:19:32 present+ 16:19:59 present+ 16:20:06 topic: @sheet 16:20:15 https://docs.google.com/presentation/d/1zE9NgFltry9Qor6ajT695wZiN74zEpydtc1oEbzlhOw/edit#slide=id.p 16:20:19 github-bot: take up https://github.com/w3c/csswg-drafts/issues/11509 16:20:19 Topic: Proposal: CSS @sheet 16:20:19 OK, I'll post this discussion to https://github.com/w3c/csswg-drafts/issues/11509. 16:20:27 slides: https://docs.google.com/presentation/d/1zE9NgFltry9Qor6ajT695wZiN74zEpydtc1oEbzlhOw/edit#slide=id.p 16:20:57 bts has joined #css 16:21:38 kschmi: justin proposed this in 2020 16:21:51 ... great discussion in 2023 where there was a resolution to add it to css-cascade 16:21:56 ... and we have some suggestions to expand it 16:22:04 ydaniv has joined #css 16:22:08 ... so I want to touch on those 16:22:23 ... quick recap 16:22:24 new explainer: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/AtSheet/explainer.md 16:22:30 ... main initial goal is bundling 16:22:41 ... non-obvious is that this is not obvious but this helps compression rations 16:23:02 ... if you can combine more things into one file dictionaries you get more hit 16:23:18 weinig has joined #css 16:23:18 aluhrs has joined #Css 16:23:20 ... some testing gives 0.4% compression improvements, so not massive but not nothing 16:23:27 castastrophe has joined #css 16:23:42 ... the important thing I want to go through is that there's a solution for sharing inline styles with declarative shadow DOM 16:23:48 ... core concept was resolved in 2023 16:24:01 ... where we allowed to reference fragments 16:24:09 ... not yet in the cascade spec 16:24:19 ... so that was the original proposal 16:24:41 ... so you have an `@sheet` block with an identifier and you can import them with a constructable stylesheet 16:24:55 jensimmons has joined #css 16:24:55 ... so that's kinda the bundling scenario. The CSS bits are a pre-requisite 16:25:08 ... but we can't get the JS part until CSS adds the syntax 16:25:24 ... so `` and also `@import` 16:25:30 ... so it can cache the file and only make one request 16:25:43 q+ 16:26:01 ... hasn't been spec'd yet, but I think that's worth doing independently 16:26:16 ... but the extension is why doesn't this work for same-page URL 16:26:20 q+ 16:26:40 ... so plain fragments would work on inline styles 16:26:46 scribe+ 16:26:53 scribe+ 16:27:03 matthieud has joined #css 16:27:03 ack emilio 16:27:06 emilio: 2 things that come to mind 16:27:23 emilio: 1. Why is this CSS-specific, in the sense that other resources ... including fragments and stuff 16:27:32 emilio: This introduces quite a divergence in how we interpret URLs 16:27:51 emilio: What you're proposing feels a bit weird because a plain fragment URL usually references the same document 16:28:01 emilio: I guess we do have some precedent for some fragment-only URLs being a bit special 16:28:28 emilio: One thing I'm concerned about, how does this behave-- if a browser doesn't implement it, the browser pulls the whole stylesheet and ignores it 16:28:35 q+ 16:28:36 emilio: it would import nested stylesheets 16:28:47 emilio: feels like a more explicit mechanism here would be nice, but maybe we can live with this? 16:28:54 emilio: I'm a bit worried about feature detection and fallbacks 16:29:01 scribe- 16:29:06 q+ justin 16:29:11 weinig has joined #css 16:29:48 ack noamr 16:30:01 We allow `supports()` in imports 16:30:02 noamr: When i see the # i expect it to be an id 16:30:16 … mixes html and css too much 16:30:32 justinf has joined #css 16:30:41 … would prefer so,meting that has a sheet attr on link 16:30:42 tuankiet645 has joined #css 16:30:49 … and other modifier to import, we have one for layer 16:31:00 … in general would be careful to use hasehs for sth that is not dom id 16:31:03 … confuses things 16:31:08 q? 16:31:26 kschmi0 has joined #css 16:31:41 kurt: fragment already acceptd in prior discussion 16:31:47 … mgiht need to be revisited 16:32:06 … if fragment does work, much like acnhors you dont need a URL it means local 16:32:06 q+ 16:32:08 … this is building on that 16:32:24 … there’s a precedent: if there is no file assume it is in the same doc 16:32:31 … only thing doing that is anchors, which is excepction to a lot of things 16:32:41 … if we do revisit fragment for this scenario, then we need to revisit for this 16:32:55 … other syntax or attr … would feel inconsistsent to not do this 16:33:07 noamr: wnated to say that it is different 16:33:20 … fragmetns and svg clip path and shapes – there are precedents but they refer to the dom id 16:33:26 … no prob with multidoc 16:33:38 ack dbaron 16:33:51 dbaron: from a URL design perspective the meaning of a fragment is generally specific to the mime-type of th resource 16:33:54 +1 dbaron 16:34:04 … the idea that in a css file to refer to an @sheet can be sensible 16:34:07 +1 as well 16:34:18 … and in an HTML file they already refer to IDs and we should be very careful about changing that 16:34:35 … I could imagine with an @sheet inside a style element, and then use the id of the style element 16:34:38 fragments without a preceding URL refer to something in the HTML document already 16:34:49 … one of the design principles here is the meaning of fragment in a URL is specificy to the mime-type 16:34:50 q+ 16:34:52 kurt: makes sense 16:35:02 … we do have a .css file in this example 16:35:16 … but there is HTML and there is a mismatch witht he mimetype 16:35:19 q+ 16:35:20 … great point 16:35:28 +1, exactly, I have no problem with it inside CSS files 16:35:29 Aluhrs has joined #Css 16:35:30 ack matthieud 16:35:39 matthieud: answer for emilio about old browser 16:35:51 … that dnt udnerstand @sheet 16:36:03 q+ 16:36:26 … how to resolve the rules inteh block 16:36:31 ... So re. what happens for all browsers, are we going to lose all the rules 16:36:38 … same solution with @layer can be applied 16:36:43 ... but we could make like @layer where anything after is considered part of it 16:37:01 ... so this looks a lot about @layer 16:37:11 ... just with no notion of priority\ 16:37:40 emilio: Concern is not only with what's in the block 16:37:46 emilio: concern is not only what happens with contents of the blocks but older browser dont have concept of importing parts of a stylesheet 16:37:51 … external parts would apply 16:37:59 matthieud: doesnt work for ??? 16:38:04 emilio: but doesnt work for link either 16:38:10 q- 16:38:13 s/???/@import 16:38:28 acj justinf 16:38:38 ack justin 16:38:56 justinf: Wanna comment on the fragment thing 16:39:02 I would have like an answer about the @layer vs @sheet though ? 16:39:09 ... has been touched that the impolicit URL is the HTML document url 16:39:24 ... being able to do about dom vs. stylesheet 16:39:38 ... on the DSD case there could be multiple sheets 16:39:47 ... and in order to do this we have to have a central resource 16:39:54 ... and I'd be a bit wary of this 16:40:21 ... there's also a question of external stylesheets with nested @sheets 16:40:33 ... it's something I'd want to avoid, we're trying to avoid global resources like custom element names or what not 16:40:39 ... so I wouldn't add another one 16:40:46 ack florian 16:41:04 florian: narrowly on this specific slide, as long as @sheet is something that exists I agree it'd be nice to use it on inline styles 16:41:14 For the `#` - it can be `#:~:sheet=the-sheet-name` like text fragments 16:41:25 ... slightly more generally I think this is quite complex and we need to move into the discussion of what this does for shadow dom 16:41:42 ... yeah it's convenient to have one file with preprocessing 16:42:06 ... http/2 deals with some of the multiple request complexity 16:42:08 ack emilio 16:42:10 for shadow DOM basic bundling is sufficient, IMO 16:42:20 s/use it on inline styles/use it on inline style elements 16:42:23 ... so outside of shadow dom I don't see a lot of use for this 16:42:44 emilio: agree with florian that main use case feels … basically about shadow dom. if you have no, you can bundle and call it a day 16:42:50 … want to try a counter proposal tha tmight work 16:42:59 … and doesnt need to add anything new 16:43:01 … except 1 thing 16:43:18 … what you really want is @import but without separate request to import into shadow dom 16:43:32 … talked about removing constructbile stylesheet restircition in adoptable ones 16:43:49 … if you have data-uri @import that you could import into SD you kinda get this behavior 16:44:01 … not user friendly, but if use case is bundlers then they can prolly manage 16:44:19 … idea would be to get the @import stylesheet and shadowroot.adopted.push(…) 16:44:33 … and if you dont want that to aply to the doc, you could isable with a non-mathcing media in the elem 16:44:33 q+ 16:44:42 … we have a lot of similar pieces that would be nice 16:44:55 … if use cases are narrow, e.g shadow dom and bundling 16:45:01 … then you might be able to get away with this 16:45:07 … has that been explored? 16:45:11 q? 16:45:14 noamr has joined #css 16:45:19 isn't that unwinding the whole proposal, including the previous resolutions? 16:45:26 yes 16:45:33 ack castastrophe 16:45:37 smfr has joined #css 16:45:40 present+ 16:45:42 `@sheet` seems a lot simpler than data URI and changes to import to me 16:45:42 castastrophe: just a question, trying to picture things in the design systems space 16:45:59 ... how would you import multiple sheets, multiple `` or `@import`? 16:46:17 kschmi: yeah you'd need multiple sheets or @import or both 16:46:23 ack justinf 16:46:38 justinf: Responding to emilio or florian... The basic @sheet to me is very simple 16:46:54 ... there's no way currently to include an inert chunk of CSS 16:47:00 ... turns out you can with @supports 16:47:20 ... but @import + data uri + ... feels a lot more complex than @sheet 16:47:36 ... The additional complexity is adding ways to reference these from inline styles 16:47:55 ... I don't think that complexity applies to that part of the proposal 16:48:13 FWIW `@import url("data...") not all;` doesn't seem /terribly/ complex to me 16:48:34 kschmi: so re. shadow dom 16:48:36 but then you need that `@import()` to 1) be inert, and 2) be importable as a separate sheet 16:49:10 ... current mechanism are duplicate `` or inline styles or script-based adoptedStyleSheets 16:49:19 ... so for declarative shadow DOM is not great 16:49:56 ... If we support the standalone fragment we can support it for declarative shadow dom 16:50:05 ... that's kinda why this is relevant to DSD 16:50:12 ... solves that messy problem r/n 16:50:29 q+ 16:50:39 ... big question justinf is concerned about is scoping 16:50:48 q+ 16:50:53 ... which is an issue, might be the same as inheriting from parent 16:51:00 dholbert has joined #css 16:51:04 ... lots of open issues, we have an explainer in MSEdgeExplainers 16:51:19 ... big list of open issues, but key problem we're solving is inline styles with declarative shadow dom 16:51:28 ... another solution for this would be declarative CSS modules 16:51:36 jensimmons has joined #css 16:51:54 ... `