ealize / rawss

Generic CSS polyfill framework, with a CSS variables implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rawss

A generic framework for polyfilling CSS Aiming for a fully functional polyfill for CSS variable

What it lets you do

  • Write any CSS in any browser that supports mutation observers, and process it.
  • Use CSS variables in any browser

Open the demo in IE: Demo

API

const {Rawss, StyleProcessor, cssVariables} = require('rawss')

StyleProcessor: A generic processor interface to handle a raw CSS rule

  • match({name, value, selector}): boolean Implement to specify which style declarations apply to your processor

  • process(element, getAtomicStyle): CSSStyleDeclaration Implement to apply raw style to real, valid style getAtomicStyle can return the raw, unfiltered style of any element

Rawss: generic API for responding to any style change

cssVariables: specific implementation for CSS variables polyfill

API

About

Generic CSS polyfill framework, with a CSS variables implementation

License:MIT License


Languages

Language:TypeScript 91.0%Language:HTML 5.4%Language:JavaScript 3.4%Language:CSS 0.2%