cd /news/large-language-models/optimizing-css-with-llms · home › topics › large-language-models › article
[ARTICLE · art-173255] src=dotnetperls.com ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Optimizing CSS with LLMs

A site owner cut 100-200 bytes from every page's inline CSS by pasting the stylesheet into the Muse Ember LLM and asking it to find size reductions, with no visual changes, at a total cost of 0.037 cents for two prompts. The model flagged redundant selectors, unused shorthand syntax and unneeded rules. The author called the exercise a clear win that speeds page loads for visitors and the bots that download the pages, while arguing AI use should stay limited to tasks like CSS minification rather than generating blog posts.

recommendation

Run bloated inline CSS through an LLM to strip redundant selectors and adopt shorthand before shipping; the source saved 100-200 bytes per page with no visual changes for 0.037 cents.

more in playbook: Controlling LLM cost
read1 min views1 publishedNov 20, 2026

I have an inline style sheet I use on every page on this site. I use inline CSS as it allows each page to load without a separate download. Over the years this CSS has become slightly bloated—I decided to paste the CSS into Muse Ember and ask it to find ways to reduce its size.

The LLM responded with a list of suggestions. Some of the selectors were redundant; and I was not using some shorthand syntax. Some rules were not needed. Overall, I saved 100-200 bytes from each page—with no visual changes.

The total cost (for two prompts) was 0.037 cents. It seems to me that this use of AI was a clear win—each page is faster, and this will improve my own experience on the site (as well as that of the bots that download my pages constantly). I wish people could use AI in a more limited way—using a chat bot to minify CSS seems like a good idea; using a chat bot to "write me a blog post" is going to just make the world more annoying.

── more in #large-language-models 4 stories · sorted by recency
── more on @muse ember 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/optimizing-css-with-…] indexed:0 read:1min 2026-11-20 · —