自訂

實用類

A guide to adding custom utility classes.

Overview

TokenCSS declarations
absposition: absolute;
bg-clip-borderbackground-clip: border-box;
bg-clip-contentbackground-clip: content-box;
bg-clip-paddingbackground-clip: padding-box;
bg-clip-textbackground-clip: text;
bg-origin-borderbackground-origin: border-box;
bg-origin-contentbackground-origin: content-box;
bg-origin-paddingbackground-origin: padding-box;
blockdisplay: block;
bottombottom: 0;
box-borderbox-sizing: border-box;
box-contentbox-sizing: content-box;
break-spaceswhite-space: break-spaces;
break-wordword-break: break-word;
capitalizetext-transform: capitalize;
centerleft: 0; right: 0; margin-left: auto; margin-right: auto;
clip-borderclip-path: border-box;
clip-contentclip-path: content-box;
clip-fillclip-path: fill-box;
clip-marginclip-path: margin-box;
clip-noneclip-path: none;
clip-paddingclip-path: padding-box;
clip-strokeclip-path: stroke-box;
clip-viewclip-path: view-box;
containercontainer-type: inline-size;
content-aroundalign-content: space-around;
content-baselinealign-content: baseline;
content-betweenalign-content: space-between;
content-centeralign-content: center;
content-endalign-content: end;
content-evenlyalign-content: space-evenly;
content-flex-endalign-content: flex-end;
content-flex-startalign-content: flex-start;
content-normalalign-content: normal;
content-startalign-content: start;
content-stretchalign-content: stretch;
contentsdisplay: contents;
fitwidth: fit-content; height: fit-content;
fixedposition: fixed;
flexdisplay: flex;
flex-colflex-direction: column;
flex-col-reverseflex-direction: column-reverse;
flex-rowflex-direction: row;
flex-row-reverseflex-direction: row-reverse;
flow-rootdisplay: flow-root;
font-antialiased-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
font-subpixel-antialiased-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;
fullwidth: 100%; height: 100%;
gradient-text-webkit-text-fill-color: transparent; background-clip: text;
griddisplay: grid;
hiddendisplay: none;
inlinedisplay: inline;
inline-blockdisplay: inline-block;
inline-flexdisplay: inline-flex;
inline-griddisplay: inline-grid;
inline-tabledisplay: inline-table;
invisiblevisibility: hidden;
isolateisolation: isolate;
italicfont-style: italic;
items-baselinealign-items: baseline;
items-centeralign-items: center;
items-endalign-items: end;
items-flex-endalign-items: flex-end;
items-flex-startalign-items: flex-start;
items-normalalign-items: normal;
items-self-endalign-items: self-end;
items-self-startalign-items: self-start;
items-startalign-items: start;
items-stretchalign-items: stretch;
justify-aroundjustify-content: space-around;
justify-betweenjustify-content: space-between;
justify-centerjustify-content: center;
justify-endjustify-content: end;
justify-evenlyjustify-content: space-evenly;
justify-flex-endjustify-content: flex-end;
justify-flex-startjustify-content: flex-start;
justify-leftjustify-content: left;
justify-normaljustify-content: normal;
justify-rightjustify-content: right;
justify-startjustify-content: start;
justify-stretchjustify-content: stretch;
leftleft: 0;
list-itemdisplay: list-item;
lowercasetext-transform: lowercase;
max-vhmax-height: 100vh;
max-vwmax-width: 100vw;
middletop: 0; bottom: 0; margin-top: auto; margin-bottom: auto;
min-vhmin-height: 100vh;
min-vwmin-width: 100vw;
obliquefont-style: oblique;
overflowoverflow: visible;
relposition: relative;
rightright: 0;
roundborder-radius: 50%; aspect-ratio: 1/1;
roundedborder-radius: 1e9em;
self-anchor-centeralign-self: anchor-center;
self-autoalign-self: auto;
self-baselinealign-self: baseline;
self-centeralign-self: center;
self-endalign-self: end;
self-flex-endalign-self: flex-end;
self-flex-startalign-self: flex-start;
self-normalalign-self: normal;
self-self-endalign-self: self-end;
self-self-startalign-self: self-start;
self-startalign-self: start;
self-stretchalign-self: stretch;
shape-bordershape-outside: border-box;
shape-contentshape-outside: content-box;
shape-marginshape-outside: margin-box;
shape-noneshape-outside: none;
shape-paddingshape-outside: padding-box;
squareaspect-ratio: 1/1;
sr-onlyposition: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
staticposition: static;
stickyposition: sticky;
tabledisplay: table;
table-captiondisplay: table-caption;
table-celldisplay: table-cell;
table-columndisplay: table-column;
table-column-groupdisplay: table-column-group;
table-footer-groupdisplay: table-footer-group;
table-header-groupdisplay: table-header-group;
table-rowdisplay: table-row;
table-row-groupdisplay: table-row-group;
toptop: 0;
transform-bordertransform-box: border-box;
transform-contenttransform-box: content-box;
transform-filltransform-box: fill-box;
transform-stroketransform-box: stroke-box;
transform-viewtransform-box: view-box;
untouchablepointer-events: none;
uppercasetext-transform: uppercase;
vhheight: 100vh;
videoaspect-ratio: 16/9;
visiblevisibility: visible;
vwwidth: 100vw;
wrap-anywhereoverflow-wrap: anywhere;
wrap-break-wordoverflow-wrap: break-word;
wrap-normaloverflow-wrap: normal;

Master CSS enables you to group CSS declarations into reusable classes, streamlining your styling process. Unlike traditional utility classes that simply map to CSS properties, Master CSS introduces a flexible syntax that supports not only declarations, but also integrates seamlessly with selectors and at-rules.

This empowers developers to write expressive, maintainable, and highly customizable styles with minimal overhead.

If you are defining .btn, you should use the components section instead.


Basic usage

Add a utility class

export default {    utilities: {        round: {             'border-radius': '50%',             'aspect-ratio': '1/1'         }     }}

Apply your custom utility class:

<div class="round">o</div>

Use with selectors and at-rules:

<div class="round:hover@sm">o</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy