Sizing

Height

Can I use ?Can I use ?
classproperties
height:size / h:sizeheight: size
h:fullheight: 100%
h:fitheight: fit-content
h:maxheight: max-content
h:maxheight: max-content
h:3xs / h:360height: 22.5rem
h:2xs / h:480height: 30rem
h:xs / h:600height: 37.5rem
h:sm / h:768height: 48rem
h:md / h:1024height: 64rem
h:lg / h:1280height: 80rem
h:xl / h:1440height: 90rem
h:2xl / h:1600height: 100rem
h:3xl / h:1920height: 120rem
h:4xl / h:2560height: 160rem

Overview

The height CSS property sets an element’s height. By default, it sets the height of the content area, but if box-sizing is set to border-box, it sets the height of the border area.

<div class="">
I know CSS very well.
<div class="h:200 p:15 writing-mode:vertical-rl ...">
    <code class="h:max ...">
        I know CSS very well.
    </code>
</div>

Applying with functions

<div class="height:$(size)">...</div>

Master supports native CSS variables and functions, just add var(--key) or use shorthand$(key) for variables.

You can also use calc(expression), env(expression) and other CSS functions if the property supports it.

To learn more, see the Functions documentation.

Conditionally apply

States and selectors

<div class="height:full:hover">...</div>

Master supports all native CSS selectors, just add :hover, :disabled, chaining, combinators and other CSS selectors as usual.

To learn more, see the Selectors documentation.

Responsive breakpoints

<div class="height:full@sm">...</div>

Responsive breakpoints can be applied to all styles. Some available breakpoints are 3xs, 2xs, xs, sm,md, lg, xl, 2xl, 3xl, 4xl. Arbitrary breakpoints can be specified through comparison operators >, >=, <, <=.

To learn more, see the Breakpoints documentation.

<div class="height:full@print">...</div>

Master supports media types like print, screen, speech, all, and other media queries.

To learn more, see the Media Queries documentation.

Dark mode and color schemes

<div class="height:full@dark">...</div>

Master uses the selector html.dark to support color schemes. Now, you can easily fine-tune your style for the color schemes.

To learn more, see the Color Schemes documentation.


© Aoyue Design LLC.
關於此頁的問題
編輯自AronLola