Fundamentals

Rendering Modes of Master CSS

Master CSS provides three rendering modes, which you can choose according to project scale and application scenarios to meet your current business requirements.

It's flexible — can be runtime, zero-runtime, or even both.

Recommended
Progressive Rendering

Renders HTML statically or server-side for class names, generates CSS rules, and loads the runtime engine asynchronously.

Learn more
Easiest
Runtime Rendering

Observe for changes to class names in the DOM tree to manipulate CSS rules and sync to the runtime stylesheet.

Learn more
Static Extraction

Extract class names from various files at build time, generate a virtual CSS module or file, and import it into the entry file.

Learn more

Hybrid

Runtime

Zero-runtime

Applicable technologies

SSG, SSR

CSR, SPA

-

Generated source

HTML string

Runtime DOM Tree

.html, .js, .jsx, .svelte, ...

Application scenarios

SaaS Software as a Service

SaaS Software as a Service

-

Highly dynamic applications

Highly dynamic applications

Semi-dynamic applications

Dashboard

Dashboard

Semi-dynamic dashboard

Static site

Static site

Static site

Page load

Lazy loading runtime engine

~16KB runtime engine

No runtime engine

Page-used CSS

Generate CSS at runtime

Load all pages CSS

Internal CSS

Render-blocking JS resources

Render-blocking CSS resources

Fastest

-

-

SEO metrics evaluation

FCP (First Contentful Paint)

-

-

The cost of browser-calculating CSS

Minimal, CSS generated on demand

Minimal, CSS generated on demand

Including page-unused CSS

~0.01ms/class generation cycle

~0.01ms/class generation cycle

None, pre-generated CSS

Browser caching

Internal CSS in HTML

External JS file

External CSS file

Dynamic and conditoinal class names

Fully dynamic

Fully dynamic

Semi-dynamic

Fully dynamic

Fully dynamic

Semi-dynamic

The reliability of CSS rules

class attributes in markup

class attributes in markup

Scan all source files

100% reliability

100% reliability

Irregular sources

Setup difficulty

transform HTML method

Import engine into the entry file

Import CSS into the entry file

Guide

Guide

Guide

SSG Static Site Generation
SSR Server-side Rendering
CSR Client-side Rendering
SPA Single-page Application
RR Runtime Rendering
SE Static Extraction
PR Progressive Rendering
SaaS Software as a Service
PREVIOUS
Conditional Queries

Apply styles based on theme, print, and other modes and queries.

NEXT
Markup-driven CSS

Master CSS styles are driven by template markups and generate CSS rules on demand.

MIT License © Aoyue Design LLC.