Wow! Loving the JIT - plus a quick question #4056
Replies: 3 comments 1 reply
-
@MartinHughes-BPC Yes you can't use spaces in there. Adam explained a bit about why here |
Beta Was this translation helpful? Give feedback.
-
Thanks for the kind words @MartinHughes-BPC ❤️ Totally agree with you, JIT is a game changer. And, fun fact: I also got confused myself when trying to do a |
Beta Was this translation helpful? Give feedback.
-
I tried what I thought would be a big problem to solve, but it was very simple. Plain CSSI wanted to create the following with JIT: grid-template-columns: auto 1fr 1fr 1fr; Fail - Tailwind with spacesThe html below will not work because spaces are not allowed: <div class="grid grid-cols-[auto 1fr 1fr 1fr]">A grid</div> Success - Tailwind with commasThe brilliant crew seems to have thought about it already, because you can do it like this: <div class="grid grid-cols-[auto,1fr,1fr,1fr]">A grid</div> ResultsDon't mind the encoding stuff, the .grid-cols-\[auto\2c 1fr\2c 1fr\2c 1fr\] {
grid-template-columns: auto 1fr 1fr 1fr;
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Fantastic work on the JIT guys! I got it up and running with my Laravel app in about 5 seconds flat! From my experimentation today, I can already see this is going to be so much faster and flow so much smoother than before. Also love the way things can be chained together and the new [] syntax for special one offs.
On to my question, which is related to the new [] syntax. I was living dangerously and played around with a custom height, specifically:
to my complete astonishment, this worked! However I confused myself later by doing almost exactly the same:
which didn't work (notice the extra spaces between the calculation). I was just wondering why the extra spaces cause a problem?
Anyway, fantastic work 👍👍👍
Cheers,
Martin.
Beta Was this translation helpful? Give feedback.
All reactions