Skip to main content
Module

x/frugal/styled.ts

A frugal web framework
Go to Latest
import * as frugal from "https://deno.land/x/frugal@0.5.0/styled.ts";

Classes

Wrapper around Rules to expose a styled tagged template

Base class for a css rules

Wrapper around ScopedRules to expose a styled tagged template

Scoped css rule, garanteed to never clash with another selector.

Functions

create a ScopedClassName

create some global styles

Rules and KeyFrames aware tagged template :

  • Rules interpolations are replaced with their selectors
  • KeyFrames interpolations are replaced with their names

generates a className string from a list of string and Rules. This function is able to skip "empty" values (undefined or null). This function also handle booleans, enabling constructs like boolean && rule.

create a GlobalClassName

create a KeyFrame

output the full stylesheet from all the rules (scoped or not), global rules and keyframes that where registered so far