1.0.8 • Published 1 year ago

prismaticss v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

prismaticss

A style framework for vanilla CSS.

Description

Designed for simplicity, made to scale, perfect for custom themes and white labeling.

Table of Contents

Installation

npm install prismaticss

Import prismaticss at the top of your primary style sheet.

/* theme.css */

@import 'prismaticss';

@layer theme {
  :root {
    /* theme variables go here */
  }
}

IMPORTANT place the import before any other css rules so it doesn't overwrite your styling.

Config

Config is only necessary for custom theming or white labeling.

If you're interested, copy the following code block into your project.

/* theme.css */

@import 'prismaticss';

@layer theme {
  :root {
    /* colors */
    --primary-hue: 0;
    --primary-saturation: 0%;
    --primary-lightness: 5%;

    --secondary-hue: 0;
    --secondary-saturation: 0%;
    --secondary-lightness: 98%;

    --accent-hue: 125;
    --accent-saturation: 100%;
    --accent-lightness: 50%;

    --compliment-hue: 33;
    --compliment-saturation: 100%;
    --compliment-lightness: 50%;

    /* sizes */
    --base-size: 12px;
    --icon-size: 24px;

    /* borders & outlines */
    --border-width: 1px;
    --border-style: solid;
    --border-color: var(--primary-a100);

    --outline-width: 1px;
    --outline-style: solid;
    --outline-color: var(--primary-a100);

    /* fonts */
    --font-family: sans-serif;
    --font-size: 16px;

    /* animations */
    --transition-speed: 200ms;
    --transition-delay: 0ms;

    --transition-timing-function: ease;
    --transition-property: all;

    /* breakpoints */
    --breakpoint-xxl: 1500px;
    --breakpoint-xl: 1200px;
    --breakpoint-l: 1024px;
    --breakpoint-m: 768px;
    --breakpoint-s: 480px;
    --breakpoint-xs: 320px;
  }
}

Usage

CSS variables are the foundation of prismaticss.

/* style.css */

@import './theme.css';

body {
  font-size: var(--font-3);
  background-color: var(--secondary-a50);
  padding: var(--size-200);
}

The expansive library offers a superset of CSS variables, based on your custom theme.

Colors

Scale

LightDark
50100200300400500600700800900950

Opacity

To use an alpha color value, prefix the number with an a.

ClearSolid
a50a100a200a300a400a500a600a700a800a900a950
5%10%20%30%40%50%60%70%80%90%95%
PrefixExample
--primary-*var(--primary-a50)
--secondary-*var(--secondary-100)
--accent-*var(--accent-200)
--compliment-*var(--compliment-300)

tailwindcss

Prismaticss also provides variables for tailwind' expertly-crafted color palette.

Credits

Questions

eliwooddesign on GitHub   |   eli@eliwooddesign.com

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago