Today's mystery puzzle… CSS import is 'bad', so I'm recommending the client removes it but… For some reason the stylesheet referenced in this one doesn't get requested in Firefox, Safari or Chrome and I can't see why
5
Is the space before import a normal space or not? Say a non-breaking space for example? Enable "Show all whitespace characters" via Command Palette to check.
1
1
BTW, I've confirmed that using a non-breaking space will make CSS ignore the rule because it's not an import rule anymore. And Command Palette is Cmd-Shift-P.
1
1
It's because import must be before other style declarations in a block drafts.csswg.org/css-cascade… Which I'd love to know the history of as this works <style>…</style> </style> @import … </style>
1
1
Ah right, forgot that one. Maybe @davidbaron knows why at-import must be at the beginning of a style sheet.
1
Last 2 paragraphs of w3.org/TR/CSS1/#the-cascade are the best I know of the original rationale. But turns out it's also good for clarity around lexically scoped features like @namespace (IIRC the CSS WG was discussing a new one last week or so).
2
2
For what it's worth,I find the original stated rationale somewhat weak (that is, why not just sort them in the middle?), although I think there may have been more to it that I've forgotten.

Nov 17, 2021 · 1:15 PM UTC

1