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.
Перейти к файлу
Greg Whitworth e2caffc629 Added check for attrs 2018-08-07 17:37:34 -07:00
src Added check for attrs 2018-08-07 17:37:34 -07:00
tests Added check for attrs 2018-08-07 17:37:34 -07:00
.gitignore updated gitignore to ignore visual studio code generated files 2017-09-20 12:03:29 -07:00
Gruntfile.js Revert "separated out logic into individual files to be refactored more" 2017-09-22 13:55:02 -07:00
Recipe.min.js Added check for attrs 2018-08-07 17:37:34 -07:00
cssUsage.src.js Added check for attrs 2018-08-07 17:37:34 -07:00
license.txt [squash] Making this branch ready for public release 2016-03-30 16:11:47 -07:00
package.json Finished combining of TSV creation and automating code removal from Recipe.min.js 2017-03-02 13:10:42 -08:00
readme.md Update readme.md 2016-06-22 14:45:22 -07:00

readme.md

CSS Usage

Overview

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.

Contributing

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

Usefulness

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 opencode@microsoft.com with any additional questions or comments.