Slate provides a set of common device sizes from @xs to @xxl.
Use only@device or not@device to target one device size. The elements below will demonstrate device targeting with each class.
To target a device or greater use {block|flex}@device to toggle the display property at the desired device level. Using block@m will set the display to block at the medium breakpoint and greater.
CSS Variables are provided for each device if you would like to use them within your other css properties.
:root { --device-xs: 576px; --device-s: 768px; --device-m: 992px; --device-l: 1200px; --device-xl: 1800px; --device-xxl: auto; }
CSS Variables cannot modify media queries. To change the device sizes you must create a slate.config.js
file and redefine the devices.
module.exports = { 'device-xs': '576px', 'device-s': '768px', 'device-m': '992px', 'device-l': '1200px', 'device-xl': '1800px', 'device-xxl': 'auto', 'device-xs-container': '540px', 'device-s-container': '720px', 'device-m-container': '960px', 'device-l-container': '1140px', 'device-xl-container': '1640px', 'device-xxl-container': 'auto' }