This script is used within our Bing and Interop crawlers to determine the properties used on a page and generalized values that could have been used.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Added check for attrs Aug 8, 2018
tests Added check for attrs Aug 8, 2018
Gruntfile.js Added a template for a completely custom crawl not requiring CSS Usag… Sep 22, 2017
Recipe.min.js Added check for attrs Aug 8, 2018
cssUsage.src.js Added check for attrs Aug 8, 2018
license.txt [squash] Making this branch ready for public release Mar 30, 2016
package.json Update Jun 22, 2016

CSS Usage


This is a script that will iterate over the document.styleSheets object and determine what was actually used from the linked stylesheets.

Why did you make this?

In order to help in planning decisions, it can be useful to know which feature or bug fix will make the biggest impact. Up until this point we knew what CSS was declared but not necessarily what was actually used by the browser.

What it does and doesn't do

There are pros and cons to any approach you take to gather telemetry. This is not the only approach we will take and think it is a good starting point to providing our telemetry externally for partners, other UAs, standards bodies, and web developers.


Getting Started

We highly recommend any advancements that you can make to the script. We expect it to only get better with the community providing pull requests. To get started you'll need to install node and git then do the following:

  1. Fork the repo (see this page for help)
  2. Clone your repo
  3. Change directories into the root of your cloned directory
  4. Then type npm install
  5. Finally build the application grunt

Making a change

  1. Make the change
  2. Write a unit test under \tests\unit-tests\test.js for your change if it is necessary
  3. Run the tests in Chrome/Firefox/Edge and ensure that they still pass
  4. Submit a pull request


You will need to complete a Contributor License Agreement (CLA) before your pull request can be accepted. This agreement testifies that you are granting us permission to use the source code you are submitting, and that this work is being submitted under appropriate license that we can use it. The process is very simple as it just hooks into your Github account. Once we have received the signed CLA, we'll review the request. You will only need to do this once.

Tips on getting a successful pull request


One very important question to ask yourself before you write any code is

Will anyone actually use this?

There are many reasons for this:

  • We want this data to be useful to many different demographics (Standards Bodies, Browser Vendors, Web Developers, etc)
  • We don't want to provide too much data that the site becomes unusable
  • There is overhead on Microsoft to add the new data to the site in a meaningful and intutive way so every change will have to answer this question (so be prepared to defend it)

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact with any additional questions or comments.