In tailwindcss ifI use a utility for calc such as:
right-[calc(-50vw 50%)]
this works as expected. I have some attributes I am trying to add to an element but can't seem to figure out how to get it work using tailwind utilities:
.element {
width: 100vw;
max-width: 100vw;
margin: 0 calc(-50vw 50%);
}
CodePudding user response:
CodePudding user response:
<div >
</div>
This will apply the calc() function to the margin-left and margin-right utilities, allowing you to use it to calculate the margin values. This will produce the same result as the original CSS code provided.