Menu

1 / 2

Six hand-written utilities in 154 KB of CSS, and the one rule that works because it is in no layer

DEV Community: css·Daniel Pertu·about 6 hours ago
#cSmtihLs
#devtocss#devto#dev#panel#rule
Reading 0:00
15s threshold

Nakodo is drawn to look like a field guide: paper, cyanotype plates, line drawings, mono

numbers. All of that is Tailwind 4 classes in the markup, except for six things that no combination of utilities

can say. Those six are @utility rules in src/app/globals.css , which is 865 lines, and I have just measured

what the build does with them.

Everything below is measured from the stylesheet the live site serves, so you can repeat it:

$ curl -s https://nakodo.app/ | grep -o '/_next/static/immutable/chunks/[a-z0-9-]*\.css' | sort -u /_next/static/immutable/chunks/10cobkkku2ww9.css /_next/static/immutable/chunks/3lx8-zlp93hp8.css

Enter fullscreen mode

Exit fullscreen mode

6,159 and 148,223 bytes, 154,382 together. Inside, five cascade layers in this order: properties , theme ,

base , components , utilities . The utilities layer is 110,382 bytes of it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.