Skip to content

About

๐Ÿฅ A small, opinionated CSS framework to make sites look good with minimal effort

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

ย 

History

476 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Design System ๐Ÿฅ

A small, opinionated CSS framework to make sites look good with minimal effort

  • ๐Ÿ”ฅ Embraces semantic HTML to make native elements look great out of the box, without classes
  • ๐Ÿ˜Ž Small set of utilities for additional states and convenience
  • ๐Ÿ› Tiny footprint (~6 kB min+gzip) with no runtime dependencies and no build step required
  • ๐ŸŒˆ Automatic color system that reduces time spent fiddling with color palettes
  • ๐Ÿช— Fully responsive

Installation

From a CDN:

@import url("https://esm.sh/gh/andreasphil/design-system@<tag>/dist/design-system.css") layer(theme);

/* Optional: import utilities */
@import url("https://esm.sh/gh/andreasphil/design-system@<tag>/dist/design-system-utils.css");

With a package manager:

pnpm install github:andreasphil/design-system#<tag>

Usage

๐Ÿ”— https://andreasphil.github.io/design-system/

First, import the CSS. I recommend using layers to avoid conflicts and specificity chaos when customizing.

@layer base, utils;

@import "@andreasphil/design-system/style.css" layer(base);
@import "@andreasphil/design-system/utils.css" layer(utils);

@layer base {
  /* Add customizations and override variables here. */
}

The CSS loosely follows CUBE CSS:

  • Global, high-level styles: Most styles apply globally to plain HTML elements. src/base/variables.css contains design tokens for colors, fonts, shared spacing, and more. You can use them to customize the Design System or apply them to your own components.

  • Blocks: The framework includes opinionated styling for almost all common HTML elements.

  • Exceptions: Some blocks, such as buttons, come with variants (also called exceptions). According to CUBE CSS, you apply variants with attributes.

  • Composition & utilities: Apart from a few utilities, these are outside the scope of the framework.

Development

Tools: Node โˆ™ pnpm โˆ™ Lightning CSS

node --run dev    # compile stylesheets in watch mode
node --run build  # bundle for production

For a demo, open index.html in a browser.

Credits

Thanks ๐Ÿ™

About

๐Ÿฅ A small, opinionated CSS framework to make sites look good with minimal effort

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages