Romain's avatar
Level 30

TailwindCSS arbitrary values in blade

Hi,

I've create a new Laravel project (laravel new tailwind-jit), I've setup tailwind following their install guide for Laravel. I run yarn hot (to start Laravel Mix' hot reload) Now in welcome.blade.php I try adding an arbitrary class: text-[14px] (like in tailwind's docs), the running script picks up the change, I get the notification that a new builds of CSS is available, but once I reload the page and select the element, no class is being created and the font is not at 14px.

Any idea if I'm missing a step to allow arbitrary values in blade files?

Thanks

0 likes
2 replies
Romain's avatar
Romain
OP
Best Answer
Level 30

nevermind,

using yarn watch instead of yarn hot fixed it... I guess I should read the docs before asking questions.

Thanks

Tjyoung's avatar

this is what I am doing for custom spacing, may be it will help!

// taiwind.config.js
// usage: h-[28rem]
module.exports = {
 theme: {
       spacing: {
                '112': '28rem',
                '128': '32rem',
                '144': '36rem',
                '160': '40rem',
                '176': '44rem',
                '192': '48rem',
                '208': '52rem',
            },
  }
}

Please or to participate in this conversation.