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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -