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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

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

c# - Search and Add Comment with OpenXML for Word -