Giter Club home page Giter Club logo

specificity-visualizer's Introduction

๐Ÿ“ˆ Specificity Visualizer

Travis CI Build Status

A visual way to analyze the specificity of selectors in CSS.


The Specificity Visualizer enables you to identify patterns, trends and inconsistencies across a CSS file in birdโ€™s-eye view. Itโ€™s especially useful for analyzing big and complex stylesheets. The underlying concept of the specificity graph has been coined by Harry Roberts.

Features

  • ๐Ÿ˜ Itโ€™s a pretty fun and nice visual experience and potentially changes the way how you look into and think about (your) stylesheets.
  • ๐Ÿ” Hover over single data points to see the exact selector or zoom into areas of interest, e.g. you can look at only the selectors of the first half of the file or you can zoom into all selectors with the specificity of 0,2,1 across the entire file.
  • ๐Ÿ“Š To better distinguish different specificity categories the data points are using proper colors and forms. You can also click on a legend item to toggle its visibility, e.g. if you only want to see all ID selectors.
  • ๐Ÿ“ธ๏ธ Taking screenshots of the chart is great to track progress, e.g. you could save a snapshot of your stylesheet before and after a major refactoring to visualize the difference. Also, you could use it for presentations to effectively communicate to other developers and/or stakeholders.
  • ๐Ÿ“ Specificities are treated as proper categories on the y axis and arenโ€™t simply โ€œadded upโ€ (after all, no amount of class selectors can overrule an ID selector). Also, selectors inside of @media, @supports and @document blocks are counted, selectors inside of @keyframes blocks arenโ€™t.

Contributing

Pull requests go into the master branch. The gh-pages branch is a presentation of the master branch at the last given push.

Prerequisites

  • You must have Node.js and Yarn installed to run the Specificity Visualizer locally.
  • Clone the repository with git clone https://github.com/isellsoap/specificity-visualizer.git
  • Go into the folder with cd specificity-visualizer

Developing

  • yarn start starts the application in development mode and continuously watches all files.

Building

  • yarn build builds the application in production mode.

Download

You can simply download the latest version of the website as a ZIP file.

License

This repository is published under the MIT license.

specificity-visualizer's People

Contributors

isellsoap avatar mellenbe avatar minaorangina avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.