{ "domain": "CSS", "description": "This domain exposes CSS read/write operations. All CSS objects, like stylesheets, rules, and styles, have an associated id used in subsequent operations on the related object. Each object type has a specific id structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the get*ForNode() calls (which accept a DOM node id). Alternatively, a client can discover all the existing stylesheets with the getAllStyleSheets() method and subsequently load the required stylesheet contents using the getStyleSheet[Text]() methods.", "availability": ["web"], "types": [ { "id": "StyleSheetId", "type": "string" }, { "id": "CSSStyleId", "type": "object", "description": "This object identifies a CSS style in a unique way.", "properties": [ { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Enclosing stylesheet identifier." }, { "name": "ordinal", "type": "integer", "description": "The style ordinal within the stylesheet." } ] }, { "id": "StyleSheetOrigin", "type": "string", "enum": ["user", "user-agent", "inspector", "regular"], "description": "Stylesheet type: \"user\" for user stylesheets, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets." }, { "id": "CSSRuleId", "type": "object", "description": "This object identifies a CSS rule in a unique way.", "properties": [ { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Enclosing stylesheet identifier." }, { "name": "ordinal", "type": "integer", "description": "The rule ordinal within the stylesheet." } ] }, { "id": "PseudoIdMatches", "type": "object", "description": "CSS rule collection for a single pseudo style.", "properties": [ { "name": "pseudoId", "type": "integer", "description": "Pseudo style identifier (see enum PseudoId in RenderStyleConstants.h)."}, { "name": "matches", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules applicable to the pseudo style."} ] }, { "id": "InheritedStyleEntry", "type": "object", "description": "CSS rule collection for a single pseudo style.", "properties": [ { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain." }, { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain." } ] }, { "id": "RuleMatch", "type": "object", "description": "Match data for a CSS rule.", "properties": [ { "name": "rule", "$ref": "CSSRule", "description": "CSS rule in the match." }, { "name": "matchingSelectors", "type": "array", "items": { "type": "integer" }, "description": "Matching selector indices in the rule's selectorList selectors (0-based)." } ] }, { "id": "CSSSelector", "type": "object", "description": "CSS selector.", "properties": [ { "name": "text", "type": "string", "description": "Canonicalized selector text." }, { "name": "specificity", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Specificity (a, b, c) tuple. Included if the selector is sent in response to CSS.getMatchedStylesForNode which provides a context element." }, { "name": "dynamic", "optional": true, "type": "boolean", "description": "Whether or not the specificity can be dynamic. Included if the selector is sent in response to CSS.getMatchedStylesForNode which provides a context element." } ] }, { "id": "SelectorList", "type": "object", "description": "Selector list data.", "properties": [ { "name": "selectors", "type": "array", "items": { "$ref": "CSSSelector" }, "description": "Selectors in the list." }, { "name": "text", "type": "string", "description": "Rule selector text." }, { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Rule selector range in the underlying resource (if available)." } ] }, { "id": "CSSStyleAttribute", "type": "object", "description": "CSS style information for a DOM style attribute.", "properties": [ { "name": "name", "type": "string", "description": "DOM attribute name (e.g. \"width\")."}, { "name": "style", "$ref": "CSSStyle", "description": "CSS style generated by the respective DOM attribute."} ] }, { "id": "CSSStyleSheetHeader", "type": "object", "description": "CSS stylesheet meta-information.", "properties": [ { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."}, { "name": "frameId", "$ref": "Network.FrameId", "description": "Owner frame identifier."}, { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."}, { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."}, { "name": "title", "type": "string", "description": "Stylesheet title."}, { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."}, { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is a