A modern Sass architecture and starter foundation for scalable, maintainable web projects
Structure your frontend. Focus on building, not configuring
AXIS is a modern Sass-based architecture designed to structure frontend projects in a clear, scalable, predictable and maintainable way.
It is a starter foundation that assumes traditional development — no Node, no bundler, no dependencies — just HTML, Sass and JavaScript. Clone it, define your semantic tokens, and start building on a solid base: normalized reset, configured typography, a functional and editable layout system, neutral components ready for your visual identity, and utilities that accelerate development — so the focus stays on what matters: building the interface.
AXIS is built around six core principles:
Development freedom No frameworks, libraries or dependencies are imposed. It is an opinionated structure with total developer freedom, providing a solid architectural foundation while allowing each project to evolve according to its own needs.
Architectural simplicity The folder structure is direct and predictable. Each layer has a single, clear responsibility, making navigation, maintenance and scalability straightforward. Every file has a place, and every place has a purpose.
Modular Sass architecture
Five clearly separated layers, each with a single responsibility, communicating through @use and @forward to create a logical style hierarchy: Abstracts → Base → Layout → Components → Sections.
Token-driven design
All visual values come from tokens. Primitive tokens are centralized in abstracts/tokens/ and globally accessible via @use. Semantic tokens are defined locally in the partial where they are consumed — eliminating unnecessary file navigation and keeping values close to where they are used.
E.g.: semantic tokens in
base/_typography.scssfor typography, inabstracts/tokens/_spacing.scssfor layout configuration, and inside each component partial for its own padding, transition and sizing values.
Desktop-first workflow
The architecture starts from the largest layout and adapts downward via @include respond(). Full support for respond-up() is included for progressive enhancement when needed.
Performance-oriented development
CSS is compiled and minified automatically. JavaScript is minified manually before deploy. Assets follow optimization guidelines documented in each folder. index.html ships with pre-configured SEO and Open Graph meta tags. Every folder and file in AXIS includes documentation, tips and comments guiding frontend best practices.
| Technology | Usage |
|---|---|
| HTML5 | Base template with SEO, OG and PWA meta tags |
| Sass (SCSS) | Modular architecture with design tokens |
| JavaScript | Free — no structure imposed |
axis/
├── .gitignore
├── .vscode/
│ └── settings.json → Live Sass Compiler configuration
├── assets/
│ ├── docs/ → Downloadable documents
│ ├── favicon/ → Icons and manifest.json
│ ├── media/
│ │ ├── img/ → Raster images (.webp, .jpg, .png)
│ │ └── video/ → Video assets (.webm, .mp4)
│ └── svg/ → Vectors, icons and illustrations
├── dist/
│ ├── main.min.css → Minified CSS (auto-generated)
│ └── script.min.js → Minified JS (manually generated)
├── src/
│ ├── css/
│ │ └── main.css → Compiled CSS for development
│ ├── js/
│ │ └── script.js → Project JavaScript (empty — ready for your project)
│ └── sass/
│ ├── abstracts/ → Tokens, functions and mixins
│ ├── base/ → Reset, typography, global and utilities
│ ├── layout/ → Container, flex and grid
│ ├── components/ → Button, card and badge
│ ├── sections/ → Header and footer (empty — ready for your project)
│ └── main.scss → Single entry point
├── index.html
├── LICENSE
├── README-ptbr.md
└── README.md
AXIS organizes Sass into five layers with clear responsibilities, following ITCSS principles:
1. Abstracts Nothing here generates CSS directly. This is the entire foundation of the system.
tokens/— 9 design token files with generic, standardized and scalable values: colors, spacing, typography, breakpoints, motion, elevation, layers, radius and opacityfunctions/— typed token access viabp()andz(), and color helpers usingcolor.scale()mixins/— container, flex, grid, grid-auto, respond, respond-up, absolute-center, focus-ring, visually-hidden and truncate
2. Base Normalization and global styles without classes.
_reset.scss— box-sizing, margin/padding reset, accessible focus-ring, text-size-adjust and scroll-behavior_typography.scss— base font with semantic tokens, Major Third (1.25) heading scale_global.scss— responsive media, font inheritance, prefers-reduced-motion_utilities.scss— sr-only, display, responsive visibility, position, text alignment, truncate and interaction
3. Layout Structural layout system with no visual opinions.
_container.scss—.containerand variants.container-{sm|md|lg|xl|xxl}_flex.scss—.flexwith direction, justify and align modifiers_grid.scss—.grid-{1-12},.col-span-{1-12},.grid-autoand responsive variants
4. Components
Neutral, token-driven components. No hardcoded colors — they use currentColor and inherit from context.
_button.scss— sizes (sm/md/lg/xl), shapes (square/circle), variants (pill/ghost), disabled state_card.scss— static and interactive, withcard__contentstructure and content alignment modifiers_badge.scss— inline, pill, neutral
5. Sections Empty partials for header and footer, ready to be styled per project.
| File | What it defines |
|---|---|
_colors.scss |
Grayscale (white → black) + 4 functional colors (green, yellow, red, blue) |
_spacing.scss |
8pt macro scale (layout) + micro scale (UI controls) + semantic tokens $gutter and $section-pad |
_typography.scss |
18 sizes (Major Third + UI), weights, line-heights and letter-spacings |
_breakpoints.scss |
6 desktop-first breakpoints: xxl, xl, lg, md, sm, xs |
_motion.scss |
5 durations + 4 easing curves (standard, in, out, back) |
_elevation.scss |
5 shadow levels (none → lg) |
_layers.scss |
Semantic z-index: back, base, header, dropdown, overlay, modal, tooltip |
_radius.scss |
6 radius values: xs, sm, md, lg, xl, full |
_opacity.scss |
6 levels: 0, 20, 40, 60, 80, 100 |
<div class="container"> <!-- max-width: 1200px (default via mixin) -->
<div class="container-sm"> <!-- max-width: 640px -->
<div class="container-md"> <!-- max-width: 768px -->
<div class="container-lg"> <!-- max-width: 1024px -->
<div class="container-xl"> <!-- max-width: 1200px -->
<div class="container-xxl"> <!-- max-width: 1280px --><div class="flex items-center justify-between">
<div class="flex flex-col items-start">
<div class="flex flex-wrap justify-center">Available modifiers: flex-col, flex-wrap, justify-start, justify-center, justify-between, justify-end, items-stretch, items-center, items-start, items-end.
<div class="grid-3"> <!-- 3 fixed columns -->
<div class="grid-3 grid-1-md"> <!-- 3 columns → 1 column at md -->
<div class="grid-auto"> <!-- automatic responsive columns -->
<div class="col-span-2"> <!-- item spans 2 columns -->
<div class="col-span-2-md"> <!-- spans 2 columns at md -->Responsive variants
.grid-{n}-{bp}override onlygrid-template-columns. The base class.grid-{n}must always be present on the element.
<!-- Sizes -->
<button class="button size-sm">Small</button>
<button class="button size-md">Medium</button>
<button class="button size-lg">Large</button>
<button class="button size-xl">X-Large</button>
<!-- Variants -->
<button class="button size-md is-pill">Pill</button>
<button class="button size-md is-ghost">Ghost</button>
<button class="button size-md" disabled>Disabled</button>
<!-- Shapes -->
<button class="button size-md shape-square">⊕</button>
<button class="button size-md shape-circle">→</button><div class="card">
<div class="card__content is-start">
<h4>Title</h4>
<p>Card content.</p>
</div>
</div>
<!-- Interactive card -->
<div class="card is-interactive">
<div class="card__content is-center">
...
</div>
</div>Alignment modifiers: is-start, is-center, is-end.
<span class="badge">Default</span>The badge inherits color via currentColor — apply color through the parent element, directly via style, or through a color class from your project.
Use mixins directly in your section or component partials:
@use "../abstracts/mixins" as mix;
@use "../abstracts/tokens" as token;
.my-component {
@include mix.flex($justify: center, $align: center);
}
.my-overlay {
@include mix.absolute-center;
}
.my-input:focus-visible {
@include mix.focus-ring(token.$blue-500, 3px);
}
@include mix.respond(md) {
// styles for md and below
}git clone https://github.com/lucas16716/axis.git your-project-name
cd your-project-nameIn VS Code, install the Live Sass Compiler extension by Glenn Marks.
The .vscode/settings.json file is already configured — once Watch Sass is active, the compiler will automatically generate:
src/css/main.css→ expanded CSS for developmentdist/main.min.css→ minified CSS for production
Click Watch Sass in the VS Code status bar.
From this point on, any change to .scss files will compile both outputs automatically.
By default, index.html points to the development CSS. For production, swap the commented links:
<!-- Development -->
<link rel="stylesheet" href="/src/css/main.css" />
<!-- Production — uncomment and comment the one above -->
<!-- <link rel="stylesheet" href="/dist/main.min.css" /> -->Add sections in src/sass/sections/ and register them in sections/_index.scss. Define semantic tokens in the partials where they are consumed and use AXIS layout classes and components as the foundation.
When cloning AXIS for a new project, the recommended workflow is:
- Update
index.html— replace SEO, OG and Twitter Card placeholders with real project data - Define your visual identity — update
manifest.jsonwith the project name, theme color and icons - Configure your semantic tokens — add semantic color variables to
_colors.scssand adjust typography values in_typography.scssfor the chosen typeface - Style header and footer —
sections/_header.scssandsections/_footer.scssare empty and ready for the project - Create your sections — add new partials in
sections/and register them insections/_index.scss
AXIS automatically generates minified CSS via Live Sass Compiler. For projects where final bundle size is critical, consider using PurgeCSS to remove unused CSS classes from the production build.
JavaScript (src/js/script.js) can be minified manually before deploy. Recommended tools: Terser or Toptal JS Minifier.
Contributions are welcome. See CONTRIBUTING.md for details on how to open issues and propose changes.
If AXIS has been useful in your project, consider supporting its development:
MIT License — © 2026 Lucas Couto
See the LICENSE file for details.
Built with lots of code and coffee by Lucas Couto.
See my work or get in touch at Lucas Code.