In my experience LLMs are surprisingly bad at CSS beyond a very basic level. They work fine if you need to change the color of a button, but when it comes to actual styling work, even intermediate stuff like position:absolute or CSS grid, Copilot or even CC default to outputting correct-looking gibberish really quickly.
That's telling about CSS design. Folks here on HN are talking about how they purposely ask LLMs about APIs that don't exist, and they hallucinate with a better and more intuitive design that they would come up with on their own.
I don't know the best solution for the problem, but CSS is a very convoluted one.
My guess is it’s because CSS is so dependent on context. Especially layout styles only make sense for a specific structure of HTML elements, which might be stored in an entirely different file and directory.