Overview
You may want to display screen with special devices, such as printers or audio-based screen readers. Master uses an intelligent matching algorithm to make all styles support CSS media queries.
Basic usage
Print Format
Let your page is stylized for print layout.
<div class="hide@print">Hide on print mode</div>
Orientation
- Set image
aspect-ratio:2/1
in landscape (horizontal) - Set image
aspect-ratio:1/1
in landscape (vertical)
<div class="aspect:2/1@landscape aspect:1/1@portrait"></div>
Motion Prefernce
It will be automatically detected, don’t use this on the classes.
Animations effect work on @motion
preferences by default. If the user requested that the system minimize the amount of non-essential motion it uses, it will work like @reduced-motion
.
<div class="">
@motion
@reduced-motion
Color Scheme Preference
For better user experience, most APPs provide color schemes switching in personal settings or pages. However, it’s impossible to override the user’s preferred color schemes through js, and it is impossible for developers to implement pure CSS through prefers-color-scheme:dark
.
Therefore, Master provides you with a solution.
See Color Schemes documentation for learning more.
Responsive breakpoints
Master provides a systematic breakpoints API for you to implement responsive breakpoints using standard media queries like font:24@media(min-width:1024px)
.
See Breakpoints documentation for learning more.