Grid and Flexbox

Justify Items

Can I use ?Can I use ?
classproperties
justify-items:value / ji:valuejustify-items: value
justify-items:autojustify-items: auto
justify-items:normaljustify-items: normal
justify-items:baselinejustify-items: baseline
justify-items:leftjustify-items: left
justify-items:centerjustify-items: center
justify-items:rightjustify-items: right
justify-items:stretchjustify-items: stretch
justify-items:legacyjustify-items: legacy
justify-items:startjustify-items: start
justify-items:endjustify-items: end
justify-items:flex-startjustify-items: flex-start
justify-items:flex-endjustify-items: flex-end
justify-items:self-startjustify-items: self-start
justify-items:self-endjustify-items: self-end

Overview

The justify-items CSS property defines the default justify-self for all items of the box, giving them all a default way of justifying each box along the appropriate axis.

<div class="">
One
Two
Three
<div class="ji:auto ...">
    <div class="...">One</div>
    <div class="...">Two</div>
    <div class="...">Three</div>
</div>

Applying with functions

<div class="justify-items:$(value)">...</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="justify-items:normal: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="justify-items:normal@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="justify-items:normal@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="justify-items:normal@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