css - How to correct below stylus code (Selectors conditional) -


how correct below code in stylus

useshortnames = true  if useshortnames     [class*="mobile-",class*="m-"]  else     [class*="mobile-"]         float: left         padding-right: 20px 

you can use ternary operator , interpolation here:

useshortnames = true selector = useshortnames ? '[class*="mobile-",class*="m-"]' : '[class*="mobile-"]'  {selector}   float: left   padding-right: 20px 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -