Name Description Size
color-db.js 16261
color.js This module is used to convert between various color types. Usage: let {colorUtils} = require("devtools/shared/css/color"); let color = new colorUtils.CssColor("red"); // In order to support css-color-4 color function, pass true to the // second argument. // e.g. // let color = new colorUtils.CssColor("red", true); color.authored === "red" color.hasAlpha === false color.valid === true color.transparent === false // transparent has a special status. color.name === "red" // returns hex when no name available. color.hex === "#f00" // returns shortHex when available else returns longHex. If alpha channel is present then we return this.alphaHex if available, or this.longAlphaHex if not. color.alphaHex === "#f00f" // returns short alpha hex when available else returns longAlphaHex. color.longHex === "#ff0000" // If alpha channel is present then we return this.longAlphaHex. color.longAlphaHex === "#ff0000ff" color.rgb === "rgb(255, 0, 0)" // If alpha channel is present // then we return this.rgba. color.rgba === "rgba(255, 0, 0, 1)" color.hsl === "hsl(0, 100%, 50%)" color.hsla === "hsla(0, 100%, 50%, 1)" // If alpha channel is present then we return this.rgba. color.hwb === "hwb(0, 0%, 0%)" color.toString() === "#f00"; // Outputs the color type determined in the COLOR_UNIT_PREF constant (above). Valid values for COLOR_UNIT_PREF are contained in CssColor.COLORUNIT. 21820
constants.js All CSS <angle> types that properties can support. 824
lexer.js Wrapper around InspectorCSSParser. Once/if https://github.com/servo/rust-cssparser/pull/374 lands, we can remove this class. 5775
moz.build 403
parsing-utils.js A generator function that lexes a CSS source string, yielding the CSS tokens. Comment tokens are dropped. @param {String} CSS source string @yield {CSSToken} The next CSSToken that is lexed @see CSSToken for details about the returned tokens 25146