diff --git a/README.md b/README.md index 9f0eef3..38435f5 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ * Hate creating unique class names over.. and over.. to use once. * You want to co-locate your styles for ⚡️ [Locality of Behavior (LoB)](https://htmx.org/essays/locality-of-behaviour/) * You wish `this` would work in ` red
green
@@ -103,7 +106,14 @@ Tailwind verbosity goes up with more child elements.
green
``` -### CSS variables and child styling + +### CSS variables and child elements +At first glance, **Tailwind Example 2** looks very promising! Exciting ...but: +* 🔴 **Every child style requires an explicit selector.** + * Tailwinds' shorthand advantages sadly disappear. + * Any more child styles added in Tailwind will become longer than vanilla CSS. + * This limited example is the best case scenario for Tailwind. +* 🔴 Not visible on github: **no highlighting for properties and units** begins to be painful. ```html @@ -154,7 +164,6 @@ Tailwind verbosity goes up with more child elements. ``` - ## 🔎 Technical FAQ -* Why do you use `QuerySelectorAll()` and not just process the `MutationObserver` results directly? - * Processing `MutationObserver` results will work well until you begin recieving subtrees (ex: DOM swap, [htmx](https://htmx.org), ajax, jquery) which requires you to walk all subtree child elements to not miss a `

Responsive Design 🔛 Resize the window!

- 🟢 = No breakpoint. Default. + 🟢 = None specified.
-
Mobile First (above breakpoint)
+
📱 Mobile First! Add styles as size increases.
@@ -99,13 +99,13 @@

Responsive Design 🔛 Resize the window!

@media xs- { &[n6] { background: var(--color); } } } -
Desktop First (below breakpoint)
+
💻 Desktop First! Add styles as size decreases.

HTMX Test

- +
Swapped DOM elements are styled instantly when they arrive.