A robust architectural foundation built upon ITCSS, OOCSS, and modern SCSS practices.
By organizing CSS from far-reaching, low-specificity styles to specific, high-specificity utilities, we eliminate the need for `!important` and reduce regression risks.
Styles become more targeted as you move down the layers.
Base styles affect many elements; utilities affect only one.
Logic moves from abstract patterns to concrete implementations.
Design Tokens in Figma
Standardized JSON Data
SCSS & CSS Variables
Premium UI Components
Global variables, colors, and configuration. Foundation for the entire system.
Examples:
$primary: #7c3aed;$spacing-4: 1rem;$breakpoint-md: 768px;Mixins, functions, and utilities for generating CSS dynamically.
Examples:
@mixin media-up($bp) {...}@function spacing($size) {...}Far-reaching, low-specificity styles like resets and normalize.
Examples:
* { box-sizing: border-box; }:root { --atomix-primary: ... }Base styling for bare HTML elements without classes.
Examples:
body { font-family: ... }h1 { font-size: 2rem; }Layout patterns and structural components (OOCSS).
Examples:
.o-container { ... }.o-grid { display: grid; }Specific UI components with modifiers and variants.
Examples:
.c-btn { ... }.c-card__header { ... }Single-purpose helper classes with highest specificity.
Examples:
.u-m-4 { margin: 1rem !important; }.u-text-center { ... }Basic building blocks: Buttons, Inputs, Badges, and Icons. They cannot be broken down further without losing functionality.
Groups of atoms bonded together: Form groups, Search bars, and Card headers. They perform simple, specific tasks.
Complex UI components: Navigation bars, Data tables, and Modals. They represent distinct sections of an interface.
Override system variables at compile-time to change colors, typography, or spacing globally.
// main.scss
@use 'atomix/styles' with (
$primary: #6366f1,
$border-radius-base: 0.5rem,
$font-family-base: ('Inter', sans-serif)
);Use CSS variables for dynamic changes like branding or dashboard colors.
:root {
--atomix-primary: #f59e0b;
--atomix-surface: #ffffff;
}
[data-theme='dark'] {
--atomix-surface: #0f172a;
}01-settings/ (Vars, Maps)02-tools/ (Mixins, Functions)03-generic/ (Reset, Normalize)04-elements/ (Base tags)05-objects/ (Grid, Layout)06-components/ (Component UI)99-utilities/ (Helper classes)We use strict prefixes to distinguish between architectural layers:
.o-*Objects (e.g., .o-container).c-*Components (e.g., .c-button).u-*Utilities (e.g., .u-m-4).is-*, .has-*States (e.g., .is-active).c-blockThe standalone entity (e.g., .c-card, .c-btn).
.c-block__elementParts of a block (e.g., .c-card__title, .c-btn__icon).
.c-block--modifierVariations (e.g., .c-card--glass, .c-btn--primary).
<div className="c-card c-card--glass">
<div className="c-card__header">
<h3 className="c-card__title">Title</h3>
</div>
<div className="c-card__body">
<button className="c-btn c-btn--primary">
Action
</button>
</div>
</div>