بنقرة واحدة
ui-css
use ui.css utility and component classes with emphasis on layout, color composition, and component styling
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
use ui.css utility and component classes with emphasis on layout, color composition, and component styling
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | ui-css |
| description | use ui.css utility and component classes with emphasis on layout, color composition, and component styling |
ui.css classes instead of bespoke CSSui.css is organized as composable layers:
tokens: design variables for spacing, radii, colors, motion, sizinglayout: structure, positioning, flex, grid, sizing, overflowcolors: background, text, border, and outline color compositioncontrols and components: ready-made interactive and content primitivesstyle and text: spacing, depth, rounding, typography, visibilityWhen authoring markup, prefer this order of thought:
layoutcolorsstyleStart with the smallest structural primitive that matches the UI:
.row for horizontal flex layout.stack for vertical layout.grid for equal-column grid layout.centered when both axes should center contentCommon layout classes:
.row, .stack, .wrap, .stretch, .top, .middle, .end, .fill, .filled.g-0 through .g-10.col-1 through .col-8.span-1 through .span-8.rel, .abs, .fix, .sticky, .cover, .to-t, .to-r, .to-b, .to-l, .to-tl, .to-br.fit, .fit-w, .fit-h, .fit-min, .fit-max, .fit-content, .fit-page, .fit-text, .fit-screen, .expand, .expand-w, .expand-h, .fill-w, .fill-h, .fill-screen.limit-text, .limit-content, .limit-page.overflow, .noflowLayout patterns to prefer:
.row middle g-2.stack g-3.grid col-2 g-3.row, content child .fill.rel, child .coverAvoid:
.row, .stack, .grid, .fill, .wrap, .col-*, and .span-*.limit-*, .w-*, .w-*p, .w-*bl, or .fit-* already express the intentThe color system is class-driven and token-based. Most color work should be done by combining an apply class with one or more modifiers.
Apply classes:
.bg applies computed background color.tx applies computed text color.bd applies border color, width, and style.ol applies outline color and widthBase semantic colors:
primary, secondary, tertiaryneutral, success, info, warning, danger, errorpaper, ink, accentColor composition patterns:
.bg-primary, .tx-ink, .bd-neutral.bg-to-paper, .tx-to-ink, .bd-to-white.bg-2b means closer to tint, .bg-8b means closer to base.bg-5o, .tx-8o, .bd-4o, .ol-6o.nobg, .notx, .nobd, .noolPreferred recipes:
class="bg bg-primary bg-to-paper bg-2b tx"class="bd bd-neutral bd-to-paper bd-6b"class="bg bg-neutral bg-to-paper bg-2b bg-6o"class="tx tx-primary tx-to-ink tx-7b"Important behavior:
.bg.tx uses contrast-color() when available, so pairing bg and tx is the safest default for filled surfacesPrefer the built-in primitives before inventing new card, badge, button, or selector CSS.
Controls from controls.js:
button, .buttoninput, .input, textarea, .textarea, select, .select; use multiple size="…" for native multi-select listboxes.checkbox, .radio, .toggle, .range.selector.selectableCommon control variants:
.primary, .secondary, .success, .warning, .danger, .neutral.outline, .ghost, .blank, .icon, .compact.hover, .active, .focus, .disabled.defaultComponent primitives from components.js:
.pill, .badge.status.card, .panel.breadcrumbsdetails.section.panelsdetails.treePreferred component recipes:
<button class="primary">Save</button><button class="outline neutral">Cancel</button><button class="danger">Delete</button><button class="ghost icon">…</button><input class="input"> or plain <input> with library CSS loaded.selector.horizontal or .selector.vertical containing hidden inputs and adjacent labels.card stack g-2.pill compact.pill outline neutralComponent composition rules:
.row or .stack rather than adding margin on each controlbg-* or tx-* classes on top.selectable for clickable list rows or cards that are not literal buttonsOnce layout and component choice are correct, use style.js utilities for finish:
.p-0 to .p-8, .m-0 to .m-8, plus side variants like .pt-2, .mw-3.rounded, .rounder, .roundest, .rd, .rd-0 to .rd-4.sh-0 to .sh-4, .raised, .inset.dim, .dimmer, .skip, .pointer, .noevPrefer gap-based spacing between siblings over per-child margins when using .row, .stack, or .grid.
.row, .stack, .grid, .fill, and .g-* before custom layout CSS.bg, .tx, .bd, and their modifiers before hardcoded color declarationsbutton, input, .card, .pill, and .selector before inventing new component classes<div class="row middle g-2 p-2 bg bg-paper tx bd bd-neutral bd-to-paper bd-6b">
<div class="fill">Project</div>
<button class="ghost">Cancel</button>
<button class="primary">Save</button>
</div>
<section class="grid col-3 g-3 limit-page">
<article class="card stack g-2 sh-1">
<div class="row middle g-2">
<span class="pill compact success">Active</span>
<span class="fill b">Account</span>
<button class="ghost icon">⋯</button>
</div>
<p class="tx tx-neutral tx-to-ink tx-7b">Summary text</p>
<div class="row end g-2">
<button class="outline neutral">Details</button>
<button class="primary">Open</button>
</div>
</article>
</section>
<div class="selector stretch">
<input id="day" type="radio" name="range" checked>
<label for="day">Day</label>
<input id="week" type="radio" name="range">
<label for="week">Week</label>
<input id="month" type="radio" name="range">
<label for="month">Month</label>
</div>
src/css/layout.jssrc/css/colors.jssrc/css/controls.jssrc/css/components.jssrc/css/style.jssrc/css/tokens.js