CSS.addRule

Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location.

{
  "name": "addRule",
  "parameters": [
    {
      "name": "styleSheetId",
      "$ref": "StyleSheetId",
      "description": "The css style sheet identifier where a new rule should be inserted."
    },
    {
      "name": "ruleText",
      "type": "string",
      "description": "The text of a new rule."
    },
    {
      "name": "location",
      "$ref": "SourceRange",
      "description": "Text position of a new rule in the target style sheet."
    }
  ],
  "returns": [
    {
      "name": "rule",
      "$ref": "CSSRule",
      "description": "The newly created rule."
    }
  ],
  "description": "Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location."
}