Vanilla Framework

4.49.0 · active · verified Sun Apr 19

Vanilla Framework is an extensible CSS framework built by Canonical, utilizing Sass for its core architecture. It provides a comprehensive set of pre-designed components, utility classes, and a robust design system for building consistent web interfaces, particularly those aligned with the Ubuntu design language. The current stable version is 4.49.0, with a rapid release cadence typically seeing multiple minor versions released each month, delivering new features, enhancements, and bug fixes. Key differentiators include its strong integration with the Ubuntu ecosystem, its extensibility through Sass themes and variables, and a focus on accessibility and modern web patterns. It offers a solid foundation for projects requiring a polished and consistent user interface without starting from scratch, consumable either by hotlinking pre-compiled CSS or, more commonly, integrated into a project's Sass build pipeline.

Common errors

Warnings

Install

Imports

Quickstart

Sets up a basic Sass build pipeline for Vanilla Framework, demonstrating how to install, import, include, and customize framework styles via Sass variables, compiling to a `dist/style.css` file.

yarn add sass vanilla-framework

// In your package.json, add a script like:
// "build-css": "sass -w --load-path=node_modules src:dist --style=compressed"

// Create a file: src/style.scss
// (The build script will compile this to dist/style.css)

// src/style.scss
// Import the entire Vanilla Framework
@import 'vanilla-framework';

// Include the main mixin to output all framework styles
@include vanilla;

// Optionally, override a Sass variable to customize the theme
$color-brand: #0073e6; // Example: Set a custom brand color

// You can also include specific parts if the entire framework is not needed:
// @include vf-b-forms; // Only include form styles

// To compile and watch for changes, run:
// yarn build-css

view raw JSON →