So we try to offer more tooling for that and also give more AI access to this tooling to be able to figure out these cases and analyze their stuff. Nice. I think this would be, what would be the order of unimportant... Okay. I'm sorry. I'm having a hard time reading this one. Would the order be unimportant for CSS when you use utility classes like Tailwind? Tailwind is a good workaround to this problem of CSS chunking or ordering, because basically CSS takes your application and generates a single CSS file from Bundler's perspective. So a single CSS file, and so no order is important because it's a single file from our perspective. And Tailwind basically handles the ordering themselves by having just a fixed order of these classes that occur in that order. So that is pretty good for our perspective, because then we don't have to care about ordering again and it also helps with that stuff. So Tailwind is the workaround, or a solution, workaround, workaround slash solution for this ordering problem. And yeah, all the atomic CSS solutions are basically that in that sense. It has trade-offs, again. Tailwind, because it does a single file, it basically breaks all your tree-shaking stuff. So you get only the classes you use in your application, but it's not page-specific, it's not chunk group-specific. So on your homepage, you're now loading all the CSS classes you need on your admin dashboard, and that's also not optimized. So it's a trade-off again. As always, everything is a trade-off. Yeah, right. Yeah, exactly. Have you explored topological sorting for CSS ordering versus request count? Yeah, so we do topological sorting after we figured out a non-cyclic graph of that. So the first thing is to get a non-cyclic graph to do topological ordering. But if you have multiple chunk groups, you don't have a non-cyclic graph in the first hand. The slides I was showing basically show you the process to figure out a non-cyclic graph, and then on this graph, we do topological ordering, but it's pretty simple then. What about layers in CSS? So it says now that layers are widely available in CSS, could they not help greatly optimize CSS? I thought the same, and we tried that, and it didn't work, because layers, if you put every CSS module into its own layer, and then just do ordering on the layers, it breaks all these CSS selector preference stuff, because then it basically doesn't work anymore, because you cannot style something with having different selector precedence and that stuff, so it breaks that kind of thing. So layers, sadly, didn't work. I thought the same, and we implemented it, actually, but then figured out that it doesn't work. Yeah, it's wild that you have to approach all of these problems and go down. This is so much complexity, right? Let's see. Regarding the order of CSS, how common is the issue if you write your styles well, or do you have common examples that would affect most people? Yeah, so if you're using the approach 3 currently by default, and that depends on you writing your styles well, and it works if you write your styles well, but, yeah, that's a problem.
Comments