Closed AndrewMarkUK closed 3 years ago
Hi
This is more of a question that an issue. hope its OK for me to write it here.
I am wishing to include a conditional css within an element tag but wondering the best way to do this, for example say I have:
After a number of attempts of different methods (that did not work) I came up with this...BUT, I don't think it is ideal...
`
<false> <div class="row row-cols-1 row-cols-md-3 g-3 mb-3 pt-3"> </false>
We can see from true I am removing 'row-cols-md-3'
But a method from within the tag would perhaps be better?
Anyone done this?
You can simplify this with a ternary condition:
<div class="row row-cols-1 {{ @Columns==8 ? '' : 'row-cols-md-3' }} g-3 mb-3 pt-3">
! the one things I did not try 👍
Thank you
Hi
This is more of a question that an issue. hope its OK for me to write it here.
I am wishing to include a conditional css within an element tag but wondering the best way to do this, for example say I have:
After a number of attempts of different methods (that did not work) I came up with this...BUT, I don't think it is ideal...
`
`
We can see from true I am removing 'row-cols-md-3'
But a method from within the tag would perhaps be better?
Anyone done this?
You can simplify this with a ternary condition:
! the one things I did not try 👍
Thank you