Skip to content

extract computed CSS property values from a web page and return them as JSON

Notifications You must be signed in to change notification settings

layoutanalysis/styledump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

styledump

is a command-line tool that loads a webpage URL into a headless chrome browser. It then extracts the computed CSS property values from that web page and return them as JSON. Duplicate property values are removed.

Installation

  1. Make sure you have the Node.js Javascript Runtime installed on your system.
  2. Open a command line prompt (cmd.exe under Windows or a shell on other operating systems) and type:
npm install -g layoutanalysis/styledump

Usage (Command line)

styledump http://www.example.com > styleinfo.json

example output:

{
    "properties": {
        "align-content": ["normal"],
        "align-items": ["normal"],
        "align-self": ["auto"],
        "alignment-baseline": ["auto"],
        "all": [""],
        "animation": ["none 0s ease 0s 1 normal none running"],
        "animation-delay": ["0s"],
        "background": ["rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box", "rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box"],
        "background-attachment": ["scroll"],
        "background-blend-mode": ["normal"],
        "background-clip": ["border-box"]
        ...
    },
    "url ": "http: //www.example.com/",
    "title": "Example Domain"
}

License

ISC


About

extract computed CSS property values from a web page and return them as JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published