Navigation: uCss > Source > Modules
Modules: Config | Base | Layout | Theming | Typography | Patterns | Utilities
Modular by Design. uCss is composed of loosely coupled, independent modules. Use the full framework for maximum power, or cherry-pick individual folders (like
LayoutorTypography) to build your own lightweight custom stack.
uCss is designed as a modular framework. While the u.min.css bundle contains everything, you don't have to use it. The source code is organized into distinct modules library (/src/lib/*), each serving a specific purpose.
This architecture allows you to:
Typography and Layout. Leave the rest.Layout never knows about Components. This means you can rip out Components and your grid won't break./src/lib folder is the source of truth. If you are ever confused about what a class does, open the CSS file. It is heavily commented and readable. Better yet, copy the file to your project and make it yours.We enforce a strict dependency graph:
components depend on layout, layout takes values from config.base never knows about components. layout never imports utilities.src/lib is effectively its own mini-package. This is why you can safely import @unqa/ucss/layout without dragging in button styles.| Module | Directory | Description | Connections |
|---|---|---|---|
| Config | /config |
(Optional): CSS Variables, design tokens, and global settings. Provides the defaults, but components will work without it using internal fallbacks. | General, Typography, Layout, Patterns, Theming |
| Base | /base |
Resets and normalizations. Handles clearing default content spacing (.cs) and clear lists (.cl). |
None |
| Typography | /typography |
Fluid type scales for Headings (.t) and Body text (.tx), plus alignment (.ta). |
Base, Config |
| Layout | /layout |
Structural engines: Grid (.g), Flex (.f), and Section (.s). |
Config, Patterns |
| Patterns | /patterns |
Interactive UI blocks: Cards (.crd), Buttons (.btn), Media (.med), Links (.lnk). |
Layout, Typography, Theming, Config |
| Theming | /theming |
Visual layers: Contextual themes (.set), Overlays (.o). |
Config |
| Utilities | /utilities |
Helper classes: Margin (.mg), Padding (.pd), Radius (.rad). |
None |
All modules are available individually or as a single bundle.
| File | Full | Clean | Min | Gzip | Brotli | Download |
|---|---|---|---|---|---|---|
u.css (Full) |
191KB | 168KB | 139KB | 23.2KB | 17.9KB | src β’ clean β’ min |
root.css |
27KB | 18KB | 15KB | 3.3KB | 2.8KB | src β’ clean β’ min |
base.css |
20KB | 17KB | 15KB | 3.8KB | 3.3KB | src β’ clean β’ min |
layout.css |
80KB | 75KB | 60KB | 8.6KB | 6.2KB | src β’ clean β’ min |
typography.css |
14KB | 9.5KB | 7.7KB | 1.7KB | 1.4KB | src β’ clean β’ min |
patterns.css |
32KB | 28KB | 24KB | 4.4KB | 3.8KB | src β’ clean β’ min |
theming.css |
19KB | 17KB | 15KB | 3.8KB | 3.2KB | src β’ clean β’ min |
utilities.css |
30KB | 25KB | 20KB | 3.6KB | 2.8KB | src β’ clean β’ min |
[!TIP] Encapsulation: uCss supports automatic prefixing (e.g.,
.u-btn). See Encapsulation & Prefixing for build instructions.
| File | HTML Snippet (Stable) |
|---|---|
u.css (Full) |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/u.min.css"> |
root.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/root.min.css"> |
base.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/base.min.css"> |
layout.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/layout.min.css"> |
typography.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/typography.min.css"> |
patterns.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/patterns.min.css"> |
theming.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/theming.min.css"> |
utilities.css |
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/utilities.min.css"> |
u.css)layout.css + local.css)./dist?You might notice that project has both /src/lib and generic {dist}/lib links. The generic links (e.g., lib/layout.min.css) point to our Distribution build.
We don't just copy files. Our dist assets go through a rigorous optimization pipeline to ensure maximum performance and compatibility:
/stable: Locked to the current major version. Safe for production./latest: Bleeding edge. Good for testing new features.Recommendation: Always use the Minified (
.min.css) versions in production. Use Source (/src/) only if you are developing locally and need to debug line numbers.
If you want to build a super-lightweight version of uCss without components (e.g., for a pure content site), you can import only the specific modules you need.
Example: A Minimal Layout System You want the Grid system and Section wrappers, but you have your own buttons and card styles.
/* 1. Configuration (Required for variables) */
@import url('https://ucss.unqa.dev/latest/lib/config/root.css');
/* 2. Base (Recommended for resets) */
@import url('https://ucss.unqa.dev/latest/lib/base.css');
/* 3. Layout (The core grid/flex engines) */
@import url('https://ucss.unqa.dev/latest/lib/layout.css');
/* Now write your own custom CSS... */
Example: Just Typography You just want the fluid typography scales.
/* 1. Configuration (Typography variables rely on this) */
@import url('https://ucss.unqa.dev/latest/lib/config/root.css');
/* 2. Typography Module */
@import url('https://ucss.unqa.dev/latest/lib/typography.css');
Note: Almost every module depends on
config/root.cssbecause that is where the CSS variables (e.g.,--gap,--p,--font-s) are defined. Always include Config first.
For granular control, you can import specific single-file bundles. All individual files are available in .min.css (recommended), .clean.css, and .css (source with map).
| Module | File | Description | Stable Link (Minified) |
|---|---|---|---|
| Config | config/root.css |
Root Variables (Colors, Fonts) | link |
| Base | base.css |
Resets & Normalizers | link |
| Layout | layout/section.css |
Section (.s) Container |
link |
layout/grid.css |
Grid (.g) System |
link | |
layout/flex.css |
Flex (.f) Utilities |
link | |
| Typography | typography/title.css |
Headings (.t) |
link |
typography/text.css |
Body Text (.tx) |
link | |
| Patterns | patterns/button.css |
Buttons (.btn) |
link |
patterns/card.css |
Cards (.crd) |
link | |
patterns/media.css |
Media (.med) |
link | |
patterns/link.css |
Link Wrapper (.lnk) |
link | |
| Theming | theming/set.css |
Contextual Sets (.set) |
link |
theming/overlay.css |
Overlays (.o) |
link | |
| Utilities | utilities/padding.css |
Padding (.pd) |
link |
utilities/margin.css |
Margin (.mg) |
link | |
utilities/radius.css |
Radius (.rad) |
link | |
utilities/blur.css |
Blur (.blur) |
link | |
utilities/shadow.css |
Shadow (.shd) |
link |
License: MPL-2.0 Copyright: Β© 2025 Shukhrat (Alive π) β€» UNQA
src/lib/ <== YOU ARE HERE
βββ config/ # 1. CONFIGURATION (The Brain)
β βββ root/ # - Semantic Modules
β β βββ colors.css # - Palettes & Themes
β β βββ typography.css # - Fonts & Scales
β β βββ layout.css # - Radius & Spacing
β β βββ patterns.css # - Component Vars
β βββ adapters/ # - CMS Adapters
β β βββ blocksy.css # - Blocksy Theme
β β βββ gutenberg.css # - WordPress Block Editor
β βββ root.css # - Entry Point
β
βββ base/ # 2. BASE (The Foundation)
β βββ html/ # - HTML Engine
β β βββ reset.css # - Normalization
β β βββ typography.css # - Text Defaults
β β βββ flow.css # - Smart Flow Engine
β β βββ lists.css # - List Styles
β β βββ forms.css # - Input Styling
β β βββ helpers.css # - HTML Utilities
β βββ html.css # - Entry Point
β
βββ patterns/ # 3. PATTERNS (The Components)
β βββ button/ # - Atomic Component
β β βββ base.css
β β βββ group.css
β βββ card/ # - Card Component
β β βββ base.css
β β βββ content.css # - Slots & Padding
β β βββ media.css # - Full-bleed Media
β β βββ subgrid.css # - Subgrid Support
β βββ button.css # - Aggregator
β βββ card.css # - Aggregator
β βββ media.css # - Media Wrapper
β βββ link.css # - Link Wrapper
β βββ patterns.css # - Entry Point
β
βββ layout/ # 4. LAYOUT (The Skeleton)
β βββ grid/ # - Grid Engine
β β βββ base.css # - Core Logic
β β βββ columns.css # - Presets
β β βββ subgrid.css # - Smart Grid
β β βββ recipes.css # - Smart Logic (.masonry .g-row)
β β βββ item.css # - Child Logic
β βββ flex/ # - Flex Engine
β β βββ base.css # - Core Logic
β β βββ alignment.css # - Alignment Tools
β β βββ gaps.css # - Smart Gaps
β β βββ item.css # - Child Logic
β βββ container.css # - Container Queries (.c)
β βββ flex.css # - Entry Point
β βββ grid.css # - Entry Point
β βββ section.css # - Structural Layout
β
βββ theming/ # 5. THEMING (The Skin)
β βββ set.css
β βββ overlay.css
β
βββ typography/ # 6. TYPOGRAPHY (The Voice)
β βββ title.css
β βββ text.css
β βββ text-align.css
β
βββ utilities/ # 7. UTILITIES (The Tools)
βββ display.css
βββ position.css
βββ overflow.css
βββ margin.css
βββ padding.css
βββ radius.css
βββ size.css # - Size Utilities
βββ blur.css
βββ utilities.css