Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created April 14, 2019 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhodgins/a96f028885053955a37ac72e99763285 to your computer and use it in GitHub Desktop.
Save tomhodgins/a96f028885053955a37ac72e99763285 to your computer and use it in GitHub Desktop.
// Takes a string
// Returns a CSSStyleSheet object
function parse(string) {}
// Takes a CSSStyleSheet or CSSRule object, or an array containing them
// Returns the objects passed in after processing with callback function
function process(object, callback) {}
// Takes a CSSStyleSheet or CSSRule object, or an array containing them
// Returns the original object, minus all CSSRule objects
function remove(object) {}
// Takes a CSSStyleSheet or CSSRule object, or an array containing them
// Returns a string
function stringify(object) {}
// Returns an array of all CSS stylesheets whose cssRules you're allowed to access from document.styleSheets
function all() {}
// Takes a CSSStyleSheet and a test function
// Returns an object with a cssRules property containing all matching CSSRule objects
function filter(stylesheet, test) {}
// Takes a string, and optionally an array of stylesheet objects
// Returns a stylesheet object containing all rules with selectors containing the string
function selector(string, list) {}
// Takes a string, and optionally an array of stylesheet objects
// Returns a stylesheet object containing all rules with properties containing the string
function property(string, list) {}
// Takes a string, and optionally an array of stylesheet objects
// Returns a stylesheet object containing all rules with values containing the string
function value(string, list) {}
// Takes a string, and optionally an array of stylesheet objects
// Returns a stylesheet object containing all media queries with condition text containing the string
function query(string, list) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment