79280139

Date: 2024-12-14 05:58:24
Score: 0.5
Natty:
Report link

Basically, just like css, tailwind css is classes/wrappers or sugar on top of css.
So whatever css code works for you, it will work inside a custom tailwind css class. For ex. inside the index.css file:

@tailwind utilities;

@layer utilities {
  header {
    clip-path: polygon(
      0 0,
      100% 0,
      100% 100%,
      0 calc(100% - 6vw)
    );
  }
}

or in a different case if you want to use and name your own class(please correct me, for the 'class' part if it isnt a class) just like @Taiseen said:

@tailwind utilities;

@layer utilities {
  .clip-your-needful-style {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 6vw));
  }
}

So, in Taiseen's case, if you want to use clip-your-needful-style in <header>, just like he said you use it like: <header className="clip-your-needful-style"> instead of just <header>.

Also the link with the code you showed, you can add the css code inside the @layer utilities{ put_them_here } code block (in .css file) and they will work.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Taiseen
  • Low reputation (0.5):
Posted by: John Xenakis