ternary operator and interpolation

354 Views Asked by At

This question is no longer valid!

1

There are 1 best solutions below

0
On BEST ANSWER

You can use ternary operator and interpolation here:

useShortNames = true
selector = useShortNames ? '[class*="mobile-",class*="m-"]' : '[class*="mobile-"]'

{selector}
  float: left
  padding-right: 20px