---
title: "Styles in Eleventy (Again)"
url: https://daily.dev/posts/styles-in-eleventy-again--ldo8helev
source_url: https://kittygiraudel.com/2026/05/11/styles-in-11ty-again
type: article
source: "Kitty says hi."
author: "Kitty Giraudel"
published: 2026-05-11T12:54:54.840Z
updated: 2026-05-12T09:00:19.483Z
tags: ["performance", "css"]
reading_time: 7
upvotes: 5
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Styles in Eleventy (Again)

**[Kitty says hi.](https://daily.dev/sources/kittygiraudel)** · [@kittygiraudel](https://daily.dev/kittygiraudel) · 7 min read · 5 upvotes · 0 comments

## Summary

A walkthrough of an optimized CSS loading strategy for an Eleventy static site. The approach uses component-colocated styles, a Cheerio-based post-processing transform to deduplicate and move stylesheets from body to head, and a custom Liquid shortcode that inlines styles as `<style>` elements in production while using external `<link>` tags in development for faster hot-reloading. The result is per-page minimal CSS with no duplicate requests.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://kittygiraudel.com/2026/05/11/styles-in-11ty-again>

## Similar posts on daily.dev

- [Static Extraction in CSS-in-JS for Efficiency in React Apps](https://daily.dev/posts/static-extraction-in-css-in-js-for-efficiency-in-react-apps-5kkh66dnn) · Telerik · 0 upvotes · 0 comments
- [Heading Anchors with Eleventy](https://daily.dev/posts/heading-anchors-with-eleventy-y7phs3dvk) · Kitty says hi. · 1 upvotes · 0 comments
- [Eleventy in a Box—just add water](https://daily.dev/posts/eleventy-in-a-box-just-add-water-0lnzuitsb) · Blogging and all that Malarkey · 3 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/styles-in-eleventy-again--ldo8helev)
