The fluid Docs

Core System

EVA CSS is now available as an npm package for easy integration into any project.
Built around fluid design principles, it transforms static Figma designs into truly responsive systems.

Installation

NPM Package
npm install eva-css-fluid

Install the core EVA CSS framework

View on NPM →

Additional Packages
npm install eva-colors eva-css-purge

Optional: Color utilities and CSS optimization

eva-colors | eva-css-purge

Current Version

v2.0.6 (November 2025)

New features: Interactive CLI, JSON configuration, validation tools, modular imports

Design System Configuration

EVA CSS is built around a 1440px design system, perfect for Figma workflows.
The scaling system adapts seamlessly to any viewport while maintaining design consistency.

SCSS Configuration Example
@use 'eva-css-fluid' with (
  $sizes: (4, 8, 16, 32, 64, 128),
  $font-sizes: (14, 16, 20, 24, 32),
  $build-class: true
);

Extract sizes from your Figma design

JSON Configuration Example
// eva.config.cjs
module.exports = {
  sizes: [4, 8, 16, 32, 64, 128],
  fontSizes: [14, 16, 20, 24, 32],
  buildClass: true
};

Centralized configuration file

Spacing & Sizing Scale

The spacing system uses a carefully crafted scale that works harmoniously across all viewport sizes. Each value is designed to create balanced proportions in your layouts.

Micro Spacing

4px, 8px, 12px

For fine adjustments and tight layouts

Component Spacing

20px, 32px, 52px

For component padding and margins

Section Spacing

84px, 136px, 220px

For section gaps and major spacing

Layout Spacing

356px, 576px, 712px

For container widths and large layouts

Responsive Modifiers

_ (underscore) - Stronger responsive scaling for mobile/tablet

- (dash) - Minimal responsive scaling

px/rem - Traditional unit suffixes for clarity

Variable Naming

$name-by-size: false
Sequential naming:
--1, --2, --3, --4, --5, --6...
$name-by-size: true (default)
Design-based naming:
--4, --8, --12, --20, --32, --52...

Design-based naming makes it easy to match your Figma specifications directly!

CLI Tools (New in v2.0+)

EVA CSS v2.0+ introduces interactive CLI commands to simplify project setup and configuration.

Available Commands

npx eva-css init

Initialize EVA CSS configuration

npx eva-css init

Creates eva.config.cjs with interactive prompts

npx eva-css setup

Complete project setup

npx eva-css setup

Interactive setup with workflow choice (SCSS vs JSON)

npx eva-css validate

Validate configuration

npx eva-css validate

Check eva.config.cjs for errors and show summary

npx eva-css generate

Generate SCSS from config

npx eva-css generate output.scss

Convert JSON config to SCSS variables

Configuration Workflows

EVA CSS v2.0+ supports two configuration methods. Choose based on your project needs.

Workflow Comparison

Feature SCSS Variables JSON Config
Setup Simple Requires script
Works with npx sass Immediately Needs custom script
Config location Inside SCSS file Separate eva.config.cjs
Multiple files Duplicated config Shared config
Validation No npx eva-css validate
Generated CSS Identical Identical

Both workflows generate identical CSS output!

Option 1: SCSS Variables (Recommended for Beginners)

Setup
// styles/main.scss
@use 'eva-css-fluid' with (
  $sizes: (4, 8, 16, 32, 64, 128),
  $font-sizes: (14, 16, 20, 24, 32),
  $build-class: true
);

Configuration directly in SCSS file

Compilation
npx sass styles/main.scss:styles/main.css

Works immediately with standard Sass

Advantages:

  • Works immediately with npx sass
  • No additional scripts needed
  • Perfect for watch mode

Disadvantages:

  • Config duplicated if multiple SCSS files
  • No validation tooling

Option 2: JSON Config (Advanced)

1. Create eva.config.cjs
// eva.config.cjs
module.exports = {
  sizes: [4, 8, 16, 32, 64, 128],
  fontSizes: [14, 16, 20, 24, 32],
  buildClass: true
};

Centralized configuration file

2. Simplify SCSS
// styles/main.scss
@use 'eva-css-fluid';

Clean import, config loaded from file

3. Build with custom script
node scripts/build-with-config.js \
  styles/main.scss \
  styles/main.css

Requires custom build script (see repo examples)

4. Validate configuration
npx eva-css validate

Check config before compilation

Advantages:

  • Single config shared across multiple files
  • Configuration validation with CLI
  • Cleaner SCSS files
  • Better for large projects

Disadvantages:

  • Requires custom build script setup
  • More complex workflow

SCSS Configuration Options

Core Configuration Variables

These variables control the fundamental behavior of EVA CSS framework.

View source on NPM - Framework configuration options

$px-rem-suffix

Development mode toggle

$px-rem-suffix: true;  // Development
$px-rem-suffix: false; // Production

Enables additional classes and debugging features

$build-class

CSS class generation

$build-class: true;  // Generate utility classes
$build-class: false; // CSS variables only

Controls whether utility classes are generated

$custom-class

Selective class generation

$custom-class: true;  // Filtered classes
$custom-class: false; // All classes

Enables granular control over which classes are generated

$name-by-size

Variable naming convention

$name-by-size: true;  // --20, --32, --52
$name-by-size: false; // --1, --2, --3

Uses actual pixel values vs sequential numbers

Design System Configuration

Customize the spacing and typography scale to match your design system.

View full documentation - Grid and spacing system

$screen

Base screen width for calculations

$screen: 1440; // Default Figma width

Used for percentage calculations in clamp() functions

$sizes

Spacing scale values

$sizes: 4, 8, 12, 20, 32, 34, 52, 
       84, 136, 220, 356, 576, 712;

Pixel values from your design system

$font-sizes

Typography scale values

$font-sizes: 12, 16, 18, 24, 
           36, 52, 72;

Font sizes from your design system

Advanced Configuration

Fine-tune the responsive behavior and class generation.

View framework source - Component generation

$properties

CSS properties to generate

$properties: (
  w: width,
  h: height,
  p: padding,
  px: padding-inline,
  py: padding-block,
  br: border-radius,
  g: gap
);
$class-config

Granular class filtering

$class-config: (
  w: (50),        // Only width:50
  h: (),          // No height classes
  px: (24),       // Only padding-inline:24
  g: ()           // No gap classes
);

Control which sizes are generated for each property

$font-class-config

Typography class filtering

$font-class-config: (
  fs: (14, 16, 18, 24, 32)
);

Control which font sizes generate classes

Mathematical Constants

Advanced mathematical values that control the responsive scaling behavior.

View framework source - Mathematical functions

$Φ (Ratio)
$Φ: 1.61803398875;

Used for proportional scaling calculations

$min & $max
$min: 0.5rem;
$max: 1rem;

Minimum and maximum scaling limits

$ez (Extreme scaling)
$ez: 142.4; // Spacing
$ez: varies; // Typography

Controls extreme responsive behavior (different for spacing vs typography)

Specialized Documentation

Detailed documentation for specific aspects of EVA CSS framework:

Typography System

Responsive typography, font scaling, and text hierarchy

→ Read Typography Docs

Sizing System

Spacing scale, responsive modifiers, and layout dimensions

→ Read Sizing Docs

Color System

OKLCH colors, opacity modifiers, and theme configuration

→ Read Color Docs

Gradient System

Emmet-style gradients, animations, and dynamic control

→ Read Gradient Docs

Ready to try ?

Quick Setup Guide (NPM Package)

Get EVA CSS up and running in minutes with the npm package.

Step 1: Install EVA CSS
npm install eva-css-fluid

Install the EVA CSS framework package

View on NPM →

Step 2: Interactive Setup
npx eva-css setup

Interactive CLI guides you through configuration

Choose workflow, set sizes, fonts, build mode

Step 3: Import in Your SCSS
// styles/main.scss
@use 'eva-css-fluid' with (
  $sizes: (4, 8, 16, 32, 64),
  $font-sizes: (14, 16, 24, 32)
);

Use your extracted Figma sizes

Step 4: Compile Your CSS
npx sass styles/main.scss:styles/main.css

Compile SCSS to CSS

Step 5: Use in HTML
<div class="w-64 p-16 _bg-brand">
  <h1 class="fs-32 _c-light">Hello EVA</h1>
</div>

Use utility classes or CSS variables

Alternative: Clone Demo Repository

Want to explore the full documentation site and examples?

Clone Documentation Site
git clone https://github.com/nkdeus/eva-framework.git
cd eva-framework
npm install

Explore full examples and documentation

View on GitHub →

Launch Development Server
npm run watch

Watch and compile SCSS files

Use Live Server extension for local preview

Project Structure

Understanding the key files and directories in your EVA CSS project.

styles/ - Main CSS and framework

examples/ - Example projects

scripts/ - Build and utility scripts

assets/ - Images and resources

styles/

Main CSS files and framework

  • main.scss - Main entry point
  • main.css - Compiled CSS
  • framework/ - SCSS framework files
styles/framework/

Core SCSS files and configuration

  • Core modules - Available via npm
  • @use 'eva-css-fluid' - Full framework
  • @use 'eva-css-fluid/variables' - Variables only
  • @use 'eva-css-fluid/core' - Core without utilities
  • @use 'eva-css-fluid/colors' - Colors only
  • View all modules →
projects/

Your project-specific SCSS files

  • View examples - Multiple project examples
  • Each project has its own eva.config.cjs
  • Demonstrates different workflows and configurations
projects/{name}/render/

Compiled CSS output

  • {project}.css - Compiled CSS
  • {project}.css.map - Source maps

Configuration Tips

Essential configuration steps to get the most out of EVA CSS.

1. Create your project
# Copy projects/try/ to projects/your-project/
# Rename try.scss to your-project.scss
# Configure your project settings

Create your own project folder based on the example

2. Configure Spacing Values
$sizes: 4, 8, 12, 20, 32, 52, 
       84, 136, 220, 356, 576, 712;

Match your Figma design system spacing

Based on 1440px Figma design (configurable)

3. Set Typography Scale
$font-sizes: 12, 16, 18, 24, 
           36, 52, 72;

Define your font size hierarchy

Development Workflow

Best practices for working with EVA CSS in your development process.

Development Mode
$px-rem-suffix: true;  // Enable all features
$build-class: true; // Generate utility classes

Use during development for full feature access

Production Mode
$px-rem-suffix: false; // Disable debug features
$custom-class: true; // Filter classes

Optimize for production with filtered output

CSS Variables Only
$build-class: false; // No utility classes
$name-by-size: true; // Design-based naming

Generate only CSS variables for custom CSS

Welcome to the Future!

A Word of Warning

Warning: Once you enter the world of fluid CSS, traditional responsive design and breakpoints will feel like something from the past!

Say goodbye to media queries and hello to truly adaptive layouts that scale naturally across every screen.