Skip to content

Parse a string of text as a CSS rule using JavaScript in the browser environment.

License

Notifications You must be signed in to change notification settings

tomhodgins/parse-css-rule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parse-css-rule

Parse a string of text as a CSS rule using JavaScript in the browser environment.

about

This module makes use of parse-css-stylesheet to return the first CSS rule parsed from any CSS stylesheet given to this function as a string.

usage

This software is distributed as an ES module and should work in all modern browsers (including Chrome/Safari/Edge/Firefox).

import parseRule from 'https://unpkg.com/parse-css-rule/index.js'

// Log the parsed CSS rule object to the console
console.log(
  parseRule(':root { background-color: lime }')
)

About

Parse a string of text as a CSS rule using JavaScript in the browser environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published