From 386e52762dfdd05c83b4020a54d90e2ec6fbc807 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 11 Jan 2025 18:00:04 -0500 Subject: lume: add csswind post Signed-off-by: Xe Iaso --- lume/src/blog/2025/_data.yml | 4 + lume/src/blog/2025/tailwind-sans-bloat.mdx | 126 +++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 lume/src/blog/2025/_data.yml create mode 100644 lume/src/blog/2025/tailwind-sans-bloat.mdx diff --git a/lume/src/blog/2025/_data.yml b/lume/src/blog/2025/_data.yml new file mode 100644 index 0000000..9cba437 --- /dev/null +++ b/lume/src/blog/2025/_data.yml @@ -0,0 +1,4 @@ +layout: blog.njk +type: blog +index: true +year: 2025 diff --git a/lume/src/blog/2025/tailwind-sans-bloat.mdx b/lume/src/blog/2025/tailwind-sans-bloat.mdx new file mode 100644 index 0000000..fca60b7 --- /dev/null +++ b/lume/src/blog/2025/tailwind-sans-bloat.mdx @@ -0,0 +1,126 @@ +--- +title: "CSSWind: bloat-free component styling" +desc: "What you need when even HTMX is too much." +date: 2025-01-11 +hero: + ai: "Stable Diffusion v1.5 with about 13 LoRAs stacked on top" + file: "vaporwave-vibes" + prompt: "A blue-haired anime woman in front of a vaporwave grid and a slowly setting synthwave sun" + social: false +--- + +I'm trying to consolidate my hosting for this website onto my cloud Kubernetes cluster as much as I can. Today I moved the part of my website that serves stickers into the Kubernetes cluster. I wanted to see how minimal I could make it. Turns out, it can be way more minimal than I thought. + +In the process I discovered how to get all the advantages of Tailwind with none of the bloat. I'm calling this CSSWind and it's the next best thing since canned bread. + +Here's an example of a Tailwind component: + + + Have you ever been far even as decided to use even go want to do look more + like? + + +Tailwind makes you style components inline using classnames. This ends up making giant chungus monsters like this: + +{/* prettier-ignore */} +
+ +
+ + + Eww. There's so many classes I can't think straight. + + +Even worse, in order to add Tailwind to my simple Go services, I have to mangle them and force Tailwind into the mix with `go generate`. Every time I do this, I just keep thinking "it would surely be simpler if I could just write CSS, right?" + +Yep, you can. Here's a semantically identical version of the Tailwind component in CSSWind: + +{/* prettier-ignore */} +
+
+ Mimi is happy +
+
+ <Mimi> Have you ever been far even as decided to use even go want to do look more like? +
+
+ +Here's the HTML for that: + +{/* prettier-ignore */} +
+ +
+ +This gives you all the advantages of Tailwind without any of the bloat, installing things from NPM, or anything else. It even works with [Xess](https://github.com/Xe/Xess)! + +As an example of how simple this is in practice, here's the sticker testing page I made when I was working on this: + +