Git Product home page Git Product logo

css-usage's Introduction

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

Legal

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 [email protected] with any additional questions or comments.

css-usage's People

Contributors

fremycompany avatar gregwhitworth avatar jakucera avatar mustjab avatar rgbkrk avatar stanleyhon avatar

Watchers

 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.