Skip to content

Repository files navigation

µCSS logo

µCSS

Full-featured themeable CSS framework built on PicoCSS v2.

Features

  • 20 color themes — One CSS file per theme, ready to use
  • 12-column responsive grid — 6 breakpoints, offsets, ordering, display utilities
  • 18 UI components — Accordion, Alert, Badge, Breadcrumb, Button, Card, Forms, Hero, Modal, Nav, Pagination, Progress, Skeleton, Spinner, Table, Toast, Tabs, Var
  • Utility classes — Color (text, background, border), positioning (sticky, fixed)
  • Dark mode — Automatic (prefers-color-scheme) or manual (data-theme)
  • Pure CSS — No JavaScript dependency
  • PHP tooling — Build and theming via PHP scripts, no Node.js/SASS required

Installation

CDN (jsDelivr)

<!-- Default theme (azure) --><linkrel="stylesheet" href="https://cdn.jsdelivr.net/npm/@digicreon/mucss/dist/mu.css"><!-- Or pick a specific color theme --><linkrel="stylesheet" href="https://cdn.jsdelivr.net/npm/@digicreon/mucss/dist/mu.violet.css">

npm

npm install @digicreon/mucss

Local

<!-- Default theme (azure) --><linkrel="stylesheet" href="dist/mu.css"><!-- Or pick a specific color theme --><linkrel="stylesheet" href="dist/mu.violet.css">

Each file is self-contained (PicoCSS base + colors + grid + all components).

Available themes

azure (default)redpinkfuchsia
purplevioletindigoblue
cyanjadegreenlime
yellowamberpumpkinorange
sandgreyzincslate

µCSS components

ComponentDescriptionExample
AccordionCollapsible sections using <details>accordion.html
AlertNotification banners, 11 colors, dismissiblealert.html
BadgeInline labels, pills, outline, attachedbadge.html
BreadcrumbNavigation trail, 4 separator styles, boxedbreadcrumb.html
Button11 colors, outline, link, 3 sizesbutton.html
CardColored <article> with header/footercard.html
FormsInput sizes (sm/lg) and validation statesforms.html
HeroFull-width hero sections, 11 colors, gradienthero.html
ModalDialog sizes (sm/default/lg/fullscreen)modal.html
NavResponsive navbar, burger menu, colored, sticky/fixednav.html
PaginationAligned, sized, borderless, responsivepagination.html
ProgressColored progress barsprogress.html
SkeletonLoading placeholders, text, title, avatar, imageskeleton.html
SpinnerLoading spinners, 11 colors, 3 sizesspinner.html
TableHover, striped, bordered, compacttable.html
ToastFixed-position notifications, 6 positions, 11 colorstoast.html
TabsStandard, pills, aligned, fullwidthtabs.html
VarStyle <var> like <code>/<kbd>/<samp>, with italic

PicoCSS native

ComponentDescriptionExample
TypographyHeadings, blockquote, lists, code, kbd, marktypography.html
Tooltipdata-tooltip with 4 placementstooltip.html
Dropdown<details class="dropdown"> menusdropdown.html
GroupInput/button groups via role="group"group.html
LoadingLoading states via aria-busy="true"loading.html
SwitchToggle switches via <input role="switch">switch.html
Checkbox & RadioCheckboxes, radios, indeterminate, validationcheckbox-radio.html
RangeRange sliders with outputrange.html
Forms (advanced)Color, date, time, file, search, helper textforms-advanced.html

Grid

Flexbox 12-column grid with 6 breakpoints:

BreakpointPrefixMin-width
Defaultcol-0
Smallcol-sm-576px
Mediumcol-md-768px
Largecol-lg-1024px
Extra-largecol-xl-1280px
Extra-extra-largecol-xxl-1536px
<divclass="row"><divclass="col-12 col-md-6 col-lg-4">Responsive column</div><divclass="col-12 col-md-6 col-lg-8">Responsive column</div></div>

Offsets (offset-{n}, offset-md-{n}...), ordering (order-first, order-md-2...) and display utilities (d-none, d-md-block...) are included.

See grid example.

Utilities

Color classes

33 utility classes for text, background, and border colors:

  • .c-{role} — text color (.c-primary, .c-success, …)
  • .bg-{role} — background color with automatic inverse text and link color
  • .border-{role} — border color
  • .c-inverse — white/black text for use on filled backgrounds

On <nav> or its parent (e.g. <header>), .bg-* classes also apply a gradient.

Positioning

ClassEffect
.sticky-topSticks to top on scroll (stays in flow)
.fixed-topFixed to viewport top (out of flow)
.fixed-bottomFixed to viewport bottom (out of flow)

On <nav>, these classes automatically add z-index and box-shadow.

Cursor

ClassEffect
.clickablePointer cursor on hover (for JS-interactive elements)

Dark mode

µCSS supports three modes:

<!-- Automatic (follows OS preference) --><html><!-- Force light --><htmldata-theme="light"><!-- Force dark --><htmldata-theme="dark">

Build

Requires PHP. No other dependencies.

php build/mu-build.php # Build all 20 themes into dist/
php build/mu-build.php --minify # Build minified
php build/mu-build.php --list # List themes and base files

Project structure

mucss/
build/
mu-build.php # Build script
mu-color-gen.php # Color variable generator
mu.theme.json # 20 theme definitions
pico.css # PicoCSS v2 base (external)
pico.colors.css # PicoCSS palette (external)
css/
mu.grid.css # 12-column grid
mu.colors.css # Color utility classes
mu.utilities.css # Positioning utilities (sticky, fixed)
mu.component.*.css # UI components (18 files)
dist/ # Build output (21 CSS files)
documentation/ # Component and feature documentation
examples/ # HTML demos for each component

Color roles

Each theme maps 11 semantic roles to PicoCSS color families:

primary · secondary · tertiary · contrast · accent · success · info · warning · error · pop · spark

pop and spark are derived roles — pop uses the same color family as accent with lighter shades, and spark uses the same color family as contrast with lighter shades. They do not appear in the theme JSON.

µCSS also provides utility classes for color and positioning — see Utilities.

Contributors

License

See LICENSE.

About

Full-ffeatured CSS framework

Topics

Resources

Stars

107 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages