Open airblade opened 1 year ago
Rails: the CLASS_LIST regex needs to find class: "..."
https://github.com/airblade/tcs/blob/f1b1c3085631d84ad0c38f02a942114f50f699eb/tcs#L16
Remember Slim templates can contain HTML tags.
It's impossible to support Slim's class shortcut because the .
separating class names is the same as the .
within Tailwind class names such as w-1.5
.
∴ If you want to use tcs
with Slim, you need to write out the class names using the class="..."
attribute.
Maybe you could make special rules for \d+\.\d+
to be treated as one and also parse parentheses and not split class names inside those?
Maybe you could make special rules for \d+.\d+ to be treated as one and also parse parentheses and not split class names inside those?
Personally I find with Tailwind projects that class="foo bar baz"
is much easier to read than .foo.bar.baz
anyway.
I'll look into it.
@bb As far as I'm aware Slim itself doesn't support class names containing .
. I know we discussed it previously over here while talking about Tailwind's arbitrary values. And if Slim doesn't support it, I can't see a reason to support it here.
(I didn't mean to close this.)
E.g. Slim templates, Rails helpers.