From 8f0222be76f6f1a5621d7996c1ac370bc59857b6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 16 Mar 2024 11:53:21 +0000 Subject: [PATCH] Add daily email for 2024-03-15 Everything is a trade-off --- source/_daily_emails/2024-03-15.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 source/_daily_emails/2024-03-15.md diff --git a/source/_daily_emails/2024-03-15.md b/source/_daily_emails/2024-03-15.md new file mode 100644 index 00000000..e20d30b2 --- /dev/null +++ b/source/_daily_emails/2024-03-15.md @@ -0,0 +1,24 @@ +--- +title: Everything is a trade-off +date: 2024-03-15 +permalink: archive/2024/03/15/everything-is-a-trade-off +tags: + - software-development +cta: d7eol +snippet: | + All solutions have advantages and disadvantages. Which works best for you? +--- + +I recently added a custom `wrapper` class within a Tailwind CSS project. + +It combined the `max-w-6xl`, `mx-auto` and `px-4` classes using `@apply`, which I rarely use. + +I added it so we didn't have to add the same classes multiple times. + +The advantage was it removed some duplication, but people needed to switch from the Twig template to the CSS file to remember what the `wrapper` class did. + +This undoes some of the advantages of Tailwind CSS and utility classes - the ability to stay in one file without needing to context switching, and easily reading what classes are on an element and immediately knowing what styles are applied to it. + +Everything is a trade-off. + +You need to decide which option feels right for you.