1.0.0 • Published 6 years ago

html-styles v1.0.0

Weekly downloads
71,921
License
MIT
Repository
github
Last release
6 years ago

Default HTML styles as defined by W3C specification

html-styles

npm install html-styles

Usage

const defaultStyles = require('html-styles');
const applicable = styles.filter(({selectorText}) => document.body.matches(selectorText));

// [
//   { selectorText: "html, body", type: "CSSStyleRule", style: {…}},
//   { selectorText: "address, blockquote, center, div, figure, figcaption, footer, form, header, hr,\nlegend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,\nh3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead,\ntbody, tfoot, tr, td, th, dir, dd, dl, dt, ol, ul, li, [dir=ltr i],\n[dir=rtl i], [dir=auto i], *|*", type: "CSSStyleRule", style: {…} }
// ]

Scrapeing

yarn install
yarn scrape

License

html-styles is released under the MIT license.