Skip to content

Media rules

Metro UI is designed as a mobile-first system. We use min-width property and container queries for building media queries.
BREAKPOINTRULESIZE PX
fsmin-width0
sxmin-width360
smmin-width576
ldmin-width640
mdmin-width768
lgmin-width992
xlmin-width1200
xxlmin-width1400
xxxlmin-width2000

The rules work for elements that are in blocks that have a container definition. Metro UI has a set of classes that define the container for the element:

  • .container - container for the content with a fixed width
  • .container-fluid - full-width container
  • .container-query - simple container
  • .row - row for the grid system
  1. You can use media rules to create responsive layouts with a grid system.
  2. You can use media rules in components with attribute data-expand-point="*".
  3. With utility functions Metro.utils.mediaExist() and Metro.utils.inMedia().
  4. With common CSS (spacing, displaying, …) classes.
<div class="row">
<div class="cell-sx-6 .cell-sm-4 .cell-md-3 .cell-lg-2 .cell-xl-1">
...
</div>
</div>