{"slug": "optimizing-css-with-llms", "title": "Optimizing CSS with LLMs", "summary": "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.", "body_md": "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.\n\nThe 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.\n\nThe 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.", "url": "https://wpnews.pro/news/optimizing-css-with-llms", "canonical_source": "https://www.dotnetperls.com/2026_11_20_optimizing-css-llms", "published_at": "2026-11-20 07:00:00+00:00", "updated_at": "2026-11-20 14:12:13.818559+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "generative-ai"], "entities": ["Muse Ember"], "also_reported_by": [], "takeaway": "Pasting a bloated inline stylesheet into an LLM and asking for size reductions removed redundant selectors and unused shorthand, saving 100-200 bytes per page with no visual changes for 0.037 cents across two prompts.", "recommendation": {"advice": "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.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/optimizing-css-with-llms", "markdown": "https://wpnews.pro/news/optimizing-css-with-llms.md", "text": "https://wpnews.pro/news/optimizing-css-with-llms.txt", "jsonld": "https://wpnews.pro/news/optimizing-css-with-llms.jsonld"}}