Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Class prefixes/modifiers


Jimi Wikman

Recommended Posts

  • Owner

Class prefixes/modifiers

Wait, what's that sm: bit in the atomic classname example above? That's a new naming convention you'll see which controls at which breakpoints the style is applied.

  • Unprefixed (e.g. ipsBorder_top). Applies to all devices, desktop and smaller.
  • md: (e.g. md:ipsBorder_top). Applies to tablets and smaller.
  • sm: (e.g. sm:ipsBorder_top). Applies to phones only.

sm and md prefixes take priority over the desktop classname. This means you provide the desktop classname but can override it for tablets and/or phones by also adding an md: or sm: classname. For example, ipsPadding_top:double sm:ipsPadding_top:half applies double top padding on desktop, but only half top padding on phones.

You'll also see modifiers on some classes (as in the example above), for example ipsPadding:half. ipsPadding is saying 'apply padding to all sides', and the ':half' modifier makes it a smaller amount.


View full record

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...