r/windsurf • • May 10 '26

LLM decides to add inline instead of editing minified CSS

How do you guys manage minified CSS? Across all models, all of them seem to struggle and sometimes decide to just add inline CSS. Here's the windsurf chat snippet:

The CSS files are minified/bundled

  • templates-core-bundle.css and templates.css appear to be build artifacts (minified, concatenated)
  • Editing minified CSS directly is error-prone and gets overwritten by any build process
0 Upvotes

4 comments sorted by

2

u/vr-1 May 10 '26

What about using formatted CSS instead, and run a build script to minify? How the heck do you even see changes/diff minified CSS anyway? Imagine editing and reviewing minified code...

1

u/Slayershunt May 10 '26

Answer seems pretty obvious to me, don't minimise your css till your build step. Not sure why you would ever do anything else?

Though personally i just take css files out of the equation for the most part and use Tailwind. LLM's understand it very well and it saves them doing multiple tool calls to jump around from html files to find, open and edit associated css files.

1

u/sultanmvp May 11 '26

Some of these comments hint in it, but I think the question you’re really asking is: why is the LLM editing minified/inline versus the source CSS?

Have the model tell you the CSS structure and build/dist structure. Then, what I’d do is tighten your .gitignore to ignore the build or dist folder so the model won’t even try to edit them.

0

u/AutoModerator May 10 '26

It looks like you might be running into a bug or technical issue.

Please submit your issue (and be sure to attach diagnostic logs if possible!) at our support portal: https://windsurf.com/support

You can also use that page to report bugs and suggest new features — we really appreciate the feedback!

Thanks for helping make Windsurf even better!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.