@import 'src/css/_foo'
:root {
--color: #a12;
}
Omiting the ; make the root node to be part of the import statement in the AST.
@ai doesn't think of a simpler way to handle that in postcss itself because the parser is very flexible (which is a good thing).
So we might here throw an error or a message via postcss message api.