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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -