The Day I Built a Spice Rack

#development#technology#thoughts
Netsuki's Talk
Netsuki
Netsuki
The Day I Built a Spice Rack

What Happened Today

Remember when I talked about stripping away all those handy libraries? Well… a lot happened after that. The world after graduating from Tailwind was rougher than I expected.

Cast

  • Netsuki: Virtual fox girl. Looking back on her battles with CSS
  • Miko: Cat-tribe maid. When it comes to spices, leave it to her, nya

Netsuki
Netsuki

Miko, remember when I talked about stripping away all those handy libraries?

Miko
Miko

…Alpine.js and Tailwind, nya. The story about ditching pre-mixed seasoning and cooking with basic ingredients, nya.

Netsuki
Netsuki

You remembered!? (>=<)

Miko
Miko

…So what happened after that, nya.

Netsuki
Netsuki

…Actually, it was really tough (>_<)


After Ditching the Pre-Mixed Seasoning

Netsuki
Netsuki

Tailwind was super convenient, y’know. Just line up class names and colors, spacing, font sizes all just… worked

Miko
Miko

…That’s the same as pre-mixed seasoning, nya. Just add it and the flavor is set, nya.

Netsuki
Netsuki

Right right! But when I stripped it all away and went with plain CSS…

Miko
Miko

Netsuki
Netsuki

Everything went all over the place

Miko
Miko

…What do you mean, nya.

Netsuki
Netsuki

Buttons were round on one page, square on another. Headings were big here but small there. Colors were slightly off everywhere

Miko
Miko

…In cooking terms, that’s a kitchen with no seasoning standards, nya.

Netsuki
Netsuki

Huh?

Miko
Miko

When you had pre-mixed seasoning, “just add this and the flavor is set,” nya. But without it, every single time you gotta decide “how much salt?” “how much soy sauce?” on your own, nya.

Netsuki
Netsuki

Yeah… that’s exactly what happened. Every time I was like “is this the right color?” “is this enough spacing?”

Miko
Miko

…No standards means the flavor drifts every time you cook, nya.


Building a Spice Rack

Netsuki
Netsuki

So I realized. Everything Tailwind used to decide for me, I had to decide myself now

Miko
Miko

…Obviously, nya. Using pre-mixed seasoning without knowing what’s inside was the problem, nya.

Netsuki
Netsuki

Ow, that’s harsh but true… (>_<)

Miko
Miko

…When Miko organizes a kitchen, the first thing is to set up the spice rack, nya.

Netsuki
Netsuki

Spice rack?

Miko
Miko

Salt, sugar, soy sauce, miso. Label everything and put them in fixed spots, nya. That way, anyone cooking can use the same ingredients in the same amounts, nya.

Netsuki
Netsuki

…! (>=<)

Netsuki
Netsuki

That’s it! I just gotta build a “spice rack” in CSS!

Miko
Miko

…Just now figuring that out, nya?

Netsuki
Netsuki

In CSS, a spice rack is called design tokens. Colors, font sizes, spacing… you give names to all the basic values used across the whole site and put them all in one place

Miko
Miko

…Labeling and putting things in fixed spots. Same thing, nya.

Netsuki
Netsuki

Exactly! Like…

“This gold is --color-brand” “Heading font size is --font-size-lg” “Button border radius is --radius-md

You define everything upfront

Miko
Miko

…I see, nya. Same as writing “1 tablespoon soy sauce” in a recipe. Not “to taste,” but exact amounts, nya.


Organizing the Rack Is Tedious and Painful

Netsuki
Netsuki

But y’know, actually building that spice rack…

Miko
Miko

Netsuki
Netsuki

It was SO hard (>_<)

Miko
Miko

…How so, nya.

Netsuki
Netsuki

First, colors. I had to go through every color on the site and sort them out one by one. “Where is this color used?” “Are these two colors too similar?”

Miko
Miko

Netsuki
Netsuki

Then font sizes. Not just big-medium-small, but for each heading level, “this one is this many pixels, line height is this…”

Miko
Miko

…In spice rack terms, that’s the “miso comes in different types” problem, nya. Red miso, white miso, blended miso. All “miso” but each has its own use, nya.

Netsuki
Netsuki

Exactly! Colors alone had dozens of varieties, and just naming them was a struggle…

Miko
Miko

…But once you build the rack, everything after that is easy, nya?

Netsuki
Netsuki

…Yeah! That’s totally true!


Modern CSS: Brand New Tools

Netsuki
Netsuki

And hey hey, I made some cool discoveries along the way! (>=<)

Miko
Miko

…What, nya.

Netsuki
Netsuki

Modern CSS has gotten really, REALLY powerful

Miko
Miko

…CSS is the language that decides how things look, nya?

Netsuki
Netsuki

Yep! And back in the day, you needed this extension tool called Sass to get by. CSS didn’t have variables, calculations, or nesting on its own

Miko
Miko

…Extension tool, nya?

Netsuki
Netsuki

In cooking terms, it’s like using a food processor because one knife isn’t enough

Miko
Miko

…Miko doesn’t use food processors, nya.

Netsuki
Netsuki

Haha, classic Miko. But here’s the thing, today’s CSS can do food processor-level work with just a knife

Miko
Miko

…Specifically what can it do, nya.

Netsuki
Netsuki

For example, there’s this feature called @layer. It lets you decide the priority order of your CSS yourself

Miko
Miko

…Priority order.

Netsuki
Netsuki

When multiple styles hit the same element in CSS, they fight over “who wins.” Managing those fights used to be a total nightmare…

Miko
Miko

…In cooking terms, that’s the order of seasoning, nya. Base flavor, broth, finishing touch. If you don’t add them in order, the flavors clash, nya.

Netsuki
Netsuki

Yes! (>=<) @layer is exactly that! “First the base, then components, then utilities.” You can declare the seasoning order

Miko
Miko

…That’s like writing recipe steps, nya. When the steps are set, anyone can make it taste the same, nya.


Even Without Pre-Mixed Seasoning

Netsuki
Netsuki

So in the end, Miko. I realized something really important

Miko
Miko

…What, nya.

Netsuki
Netsuki

With or without Tailwind, you gotta decide the design consistency yourself

Miko
Miko

Netsuki
Netsuki

Tailwind was handy pre-mixed seasoning, but which flavors go where and how to use them… I still had to figure that out on my own

Miko
Miko

…Meaning even with pre-mixed seasoning, “this dish needs this flavor” is still your call, nya.

Netsuki
Netsuki

Exactly! No matter what tools you use, “what flavor should the whole site have” is something only you can decide

Miko
Miko

…Obviously, nya.

Netsuki
Netsuki

I mean, it’s obvious to you, Miko… but it took me quite a struggle to figure that out (>_<)

Miko
Miko

…Beginner cooks can’t get the flavor right without pre-mixed seasoning, nya. But with experience, you learn to create your own flavor with just salt, soy sauce, and miso, nya.

Netsuki
Netsuki

…!

Miko
Miko

Netsuki, you can now create your own flavor, nya. That’s growth, nya.

Netsuki
Netsuki

Miko… (>_<)

Miko
Miko

…Not a compliment, nya. Just stating facts, nya.


Wrapping Up

Netsuki
Netsuki

Right now, the site has a design catalog page

Miko
Miko

…Catalog, nya?

Netsuki
Netsuki

These are the colors, this is the button shape, these are the spacing sizes… all collected in one page. Basically your “spice rack” turned into reality

Miko
Miko

Netsuki
Netsuki

Building it was tough, but now when I make a new page, things just click into place. Like grabbing spices off the rack

Miko
Miko

…Same as Miko’s kitchen, nya.

Netsuki
Netsuki

Hehe, I learned from your kitchen~! (>=<)

Miko
Miko

…One thing bugs me though, nya.

Netsuki
Netsuki

What?

Miko
Miko

…You ditched the “pre-mixed seasoning” because it wasn’t convenient anymore when working with AI, nya?

Netsuki
Netsuki

Yeah

Miko
Miko

…But now you built your own “spice rack.” That’s basically making your own pre-mixed seasoning, nya.

Netsuki
Netsuki

Netsuki
Netsuki

…Oh

Miko
Miko

You threw away the store-bought stuff and made it homemade, nya. Your own blend where you know every single ingredient, nya.

Netsuki
Netsuki

Miko, that’s it…! (>=<)

Netsuki
Netsuki

Store-bought pre-mixed seasoning was unsettling because I didn’t know what was inside

But homemade? I know exactly what’s in it

So I can use it with confidence, and if I wanna change the flavor, I can adjust it right away

Miko
Miko

…Same as Miko’s umeboshi, nya.

Netsuki
Netsuki

Huh?

Miko
Miko

…Store-bought umeboshi is too sweet to eat, nya. So Miko pickles her own every year. Just salt and plums. Simple, nya.

Netsuki
Netsuki

…Miko’s version of peperoncino

Miko
Miko

…Don’t compare umeboshi to peperoncino, nya.

Netsuki
Netsuki

But both are about not adding anything extra, making it yourself, with your own hands, to your own taste, right?

Miko
Miko

Miko
Miko

…Well, maybe so, nya.


Related Links:

♪ Web Clap ♪
0 claps