Liking cljdoc? Tell your friends :D

clj-chrome-devtools.commands.css

This domain exposes CSS read/write operations. All CSS objects (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). A client can also keep track of stylesheets via the styleSheetAdded/styleSheetRemoved events and subsequently load the required stylesheet contents using the getStyleSheet[Text]() methods.

This domain exposes CSS read/write operations. All CSS objects (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). A client can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
raw docstring

add-ruleclj

(add-rule)
(add-rule {:as params :keys [style-sheet-id rule-text location]})
(add-rule connection {:as params :keys [style-sheet-id rule-text location]})

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

Parameters map keys:

KeyDescription
:style-sheet-idThe css style sheet identifier where a new rule should be inserted.
:rule-textThe text of a new rule.
:locationText position of a new rule in the target style sheet.

Return map keys:

KeyDescription
:ruleThe newly created rule.
Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the position specified by `location`.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | The css style sheet identifier where a new rule should be inserted.
  :rule-text      | The text of a new rule.
  :location       | Text position of a new rule in the target style sheet.

Return map keys:


  Key   | Description 
  ------|------------ 
  :rule | The newly created rule.
sourceraw docstring

collect-class-namesclj

(collect-class-names)
(collect-class-names {:as params :keys [style-sheet-id]})
(collect-class-names connection {:as params :keys [style-sheet-id]})

Returns all class names from specified stylesheet.

Parameters map keys:

KeyDescription
:style-sheet-idnull

Return map keys:

KeyDescription
:class-namesClass name list.
Returns all class names from specified stylesheet.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | null

Return map keys:


  Key          | Description 
  -------------|------------ 
  :class-names | Class name list.
sourceraw docstring

create-style-sheetclj

(create-style-sheet)
(create-style-sheet {:as params :keys [frame-id]})
(create-style-sheet connection {:as params :keys [frame-id]})

Creates a new special "via-inspector" stylesheet in the frame with given frameId.

Parameters map keys:

KeyDescription
:frame-idIdentifier of the frame where "via-inspector" stylesheet should be created.

Return map keys:

KeyDescription
:style-sheet-idIdentifier of the created "via-inspector" stylesheet.
Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.

Parameters map keys:


  Key       | Description 
  ----------|------------ 
  :frame-id | Identifier of the frame where "via-inspector" stylesheet should be created.

Return map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | Identifier of the created "via-inspector" stylesheet.
sourceraw docstring

disableclj

(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})

Disables the CSS agent for the given page.

Disables the CSS agent for the given page.
sourceraw docstring

enableclj

(enable)
(enable {:as params :keys []})
(enable connection {:as params :keys []})

Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.

Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
sourceraw docstring

force-pseudo-stateclj

(force-pseudo-state)
(force-pseudo-state {:as params :keys [node-id forced-pseudo-classes]})
(force-pseudo-state connection
                    {:as params :keys [node-id forced-pseudo-classes]})

Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.

Parameters map keys:

KeyDescription
:node-idThe element id for which to force the pseudo state.
:forced-pseudo-classesElement pseudo classes to force when computing the element's style.
Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.

Parameters map keys:


  Key                    | Description 
  -----------------------|------------ 
  :node-id               | The element id for which to force the pseudo state.
  :forced-pseudo-classes | Element pseudo classes to force when computing the element's style.
sourceraw docstring

get-background-colorsclj

(get-background-colors)
(get-background-colors {:as params :keys [node-id]})
(get-background-colors connection {:as params :keys [node-id]})

Parameters map keys:

KeyDescription
:node-idId of the node to get background colors for.

Return map keys:

KeyDescription
:background-colorsThe range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load). (optional)
:computed-font-sizeThe computed font size for this node, as a CSS computed value string (e.g. '12px'). (optional)
:computed-font-weightThe computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100'). (optional)
:computed-body-font-sizeThe computed font size for the document body, as a computed CSS value string (e.g. '16px'). (optional)

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :node-id | Id of the node to get background colors for.

Return map keys:


  Key                      | Description 
  -------------------------|------------ 
  :background-colors       | The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load). (optional)
  :computed-font-size      | The computed font size for this node, as a CSS computed value string (e.g. '12px'). (optional)
  :computed-font-weight    | The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100'). (optional)
  :computed-body-font-size | The computed font size for the document body, as a computed CSS value string (e.g. '16px'). (optional)
sourceraw docstring

get-computed-style-for-nodeclj

(get-computed-style-for-node)
(get-computed-style-for-node {:as params :keys [node-id]})
(get-computed-style-for-node connection {:as params :keys [node-id]})

Returns the computed style for a DOM node identified by nodeId.

Parameters map keys:

KeyDescription
:node-idnull

Return map keys:

KeyDescription
:computed-styleComputed style for the specified DOM node.
Returns the computed style for a DOM node identified by `nodeId`.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :node-id | null

Return map keys:


  Key             | Description 
  ----------------|------------ 
  :computed-style | Computed style for the specified DOM node.
sourceraw docstring

get-inline-styles-for-nodeclj

(get-inline-styles-for-node)
(get-inline-styles-for-node {:as params :keys [node-id]})
(get-inline-styles-for-node connection {:as params :keys [node-id]})

Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.

Parameters map keys:

KeyDescription
:node-idnull

Return map keys:

KeyDescription
:inline-styleInline style for the specified DOM node. (optional)
:attributes-styleAttribute-defined element style (e.g. resulting from "width=20 height=100%"). (optional)
Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by `nodeId`.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :node-id | null

Return map keys:


  Key               | Description 
  ------------------|------------ 
  :inline-style     | Inline style for the specified DOM node. (optional)
  :attributes-style | Attribute-defined element style (e.g. resulting from "width=20 height=100%"). (optional)
sourceraw docstring

get-matched-styles-for-nodeclj

(get-matched-styles-for-node)
(get-matched-styles-for-node {:as params :keys [node-id]})
(get-matched-styles-for-node connection {:as params :keys [node-id]})

Returns requested styles for a DOM node identified by nodeId.

Parameters map keys:

KeyDescription
:node-idnull

Return map keys:

KeyDescription
:inline-styleInline style for the specified DOM node. (optional)
:attributes-styleAttribute-defined element style (e.g. resulting from "width=20 height=100%"). (optional)
:matched-css-rulesCSS rules matching this node, from all applicable stylesheets. (optional)
:pseudo-elementsPseudo style matches for this node. (optional)
:inheritedA chain of inherited styles (from the immediate node parent up to the DOM tree root). (optional)
:css-keyframes-rulesA list of CSS keyframed animations matching this node. (optional)
Returns requested styles for a DOM node identified by `nodeId`.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :node-id | null

Return map keys:


  Key                  | Description 
  ---------------------|------------ 
  :inline-style        | Inline style for the specified DOM node. (optional)
  :attributes-style    | Attribute-defined element style (e.g. resulting from "width=20 height=100%"). (optional)
  :matched-css-rules   | CSS rules matching this node, from all applicable stylesheets. (optional)
  :pseudo-elements     | Pseudo style matches for this node. (optional)
  :inherited           | A chain of inherited styles (from the immediate node parent up to the DOM tree root). (optional)
  :css-keyframes-rules | A list of CSS keyframed animations matching this node. (optional)
sourceraw docstring

get-media-queriesclj

(get-media-queries)
(get-media-queries {:as params :keys []})
(get-media-queries connection {:as params :keys []})

Returns all media queries parsed by the rendering engine.

Return map keys:

KeyDescription
:mediasnull
Returns all media queries parsed by the rendering engine.

Return map keys:


  Key     | Description 
  --------|------------ 
  :medias | null
sourceraw docstring

get-platform-fonts-for-nodeclj

(get-platform-fonts-for-node)
(get-platform-fonts-for-node {:as params :keys [node-id]})
(get-platform-fonts-for-node connection {:as params :keys [node-id]})

Requests information about platform fonts which we used to render child TextNodes in the given node.

Parameters map keys:

KeyDescription
:node-idnull

Return map keys:

KeyDescription
:fontsUsage statistics for every employed platform font.
Requests information about platform fonts which we used to render child TextNodes in the given node.

Parameters map keys:


  Key      | Description 
  ---------|------------ 
  :node-id | null

Return map keys:


  Key    | Description 
  -------|------------ 
  :fonts | Usage statistics for every employed platform font.
sourceraw docstring

get-style-sheet-textclj

(get-style-sheet-text)
(get-style-sheet-text {:as params :keys [style-sheet-id]})
(get-style-sheet-text connection {:as params :keys [style-sheet-id]})

Returns the current textual content and the URL for a stylesheet.

Parameters map keys:

KeyDescription
:style-sheet-idnull

Return map keys:

KeyDescription
:textThe stylesheet text.
Returns the current textual content and the URL for a stylesheet.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | null

Return map keys:


  Key   | Description 
  ------|------------ 
  :text | The stylesheet text.
sourceraw docstring

set-effective-property-value-for-nodeclj

(set-effective-property-value-for-node)
(set-effective-property-value-for-node {:as params
                                        :keys [node-id property-name value]})
(set-effective-property-value-for-node connection
                                       {:as params
                                        :keys [node-id property-name value]})

Find a rule with the given active property for the given node and set the new value for this property

Parameters map keys:

KeyDescription
:node-idThe element id for which to set property.
:property-namenull
:valuenull
Find a rule with the given active property for the given node and set the new value for this property

Parameters map keys:


  Key            | Description 
  ---------------|------------ 
  :node-id       | The element id for which to set property.
  :property-name | null
  :value         | null
sourceraw docstring

set-keyframe-keyclj

(set-keyframe-key)
(set-keyframe-key {:as params :keys [style-sheet-id range key-text]})
(set-keyframe-key connection {:as params :keys [style-sheet-id range key-text]})

Modifies the keyframe rule key text.

Parameters map keys:

KeyDescription
:style-sheet-idnull
:rangenull
:key-textnull

Return map keys:

KeyDescription
:key-textThe resulting key text after modification.
Modifies the keyframe rule key text.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | null
  :range          | null
  :key-text       | null

Return map keys:


  Key       | Description 
  ----------|------------ 
  :key-text | The resulting key text after modification.
sourceraw docstring

set-media-textclj

(set-media-text)
(set-media-text {:as params :keys [style-sheet-id range text]})
(set-media-text connection {:as params :keys [style-sheet-id range text]})

Modifies the rule selector.

Parameters map keys:

KeyDescription
:style-sheet-idnull
:rangenull
:textnull

Return map keys:

KeyDescription
:mediaThe resulting CSS media rule after modification.
Modifies the rule selector.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | null
  :range          | null
  :text           | null

Return map keys:


  Key    | Description 
  -------|------------ 
  :media | The resulting CSS media rule after modification.
sourceraw docstring

set-rule-selectorclj

(set-rule-selector)
(set-rule-selector {:as params :keys [style-sheet-id range selector]})
(set-rule-selector connection
                   {:as params :keys [style-sheet-id range selector]})

Modifies the rule selector.

Parameters map keys:

KeyDescription
:style-sheet-idnull
:rangenull
:selectornull

Return map keys:

KeyDescription
:selector-listThe resulting selector list after modification.
Modifies the rule selector.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | null
  :range          | null
  :selector       | null

Return map keys:


  Key            | Description 
  ---------------|------------ 
  :selector-list | The resulting selector list after modification.
sourceraw docstring

set-style-sheet-textclj

(set-style-sheet-text)
(set-style-sheet-text {:as params :keys [style-sheet-id text]})
(set-style-sheet-text connection {:as params :keys [style-sheet-id text]})

Sets the new stylesheet text.

Parameters map keys:

KeyDescription
:style-sheet-idnull
:textnull

Return map keys:

KeyDescription
:source-map-urlURL of source map associated with script (if any). (optional)
Sets the new stylesheet text.

Parameters map keys:


  Key             | Description 
  ----------------|------------ 
  :style-sheet-id | null
  :text           | null

Return map keys:


  Key             | Description 
  ----------------|------------ 
  :source-map-url | URL of source map associated with script (if any). (optional)
sourceraw docstring

set-style-textsclj

(set-style-texts)
(set-style-texts {:as params :keys [edits]})
(set-style-texts connection {:as params :keys [edits]})

Applies specified style edits one after another in the given order.

Parameters map keys:

KeyDescription
:editsnull

Return map keys:

KeyDescription
:stylesThe resulting styles after modification.
Applies specified style edits one after another in the given order.

Parameters map keys:


  Key    | Description 
  -------|------------ 
  :edits | null

Return map keys:


  Key     | Description 
  --------|------------ 
  :styles | The resulting styles after modification.
sourceraw docstring

start-rule-usage-trackingclj

(start-rule-usage-tracking)
(start-rule-usage-tracking {:as params :keys []})
(start-rule-usage-tracking connection {:as params :keys []})

Enables the selector recording.

Enables the selector recording.
sourceraw docstring

stop-rule-usage-trackingclj

(stop-rule-usage-tracking)
(stop-rule-usage-tracking {:as params :keys []})
(stop-rule-usage-tracking connection {:as params :keys []})

The list of rules with an indication of whether these were used

Return map keys:

KeyDescription
:rule-usagenull
The list of rules with an indication of whether these were used

Return map keys:


  Key         | Description 
  ------------|------------ 
  :rule-usage | null
sourceraw docstring

take-coverage-deltaclj

(take-coverage-delta)
(take-coverage-delta {:as params :keys []})
(take-coverage-delta connection {:as params :keys []})

Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)

Return map keys:

KeyDescription
:coveragenull
Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)

Return map keys:


  Key       | Description 
  ----------|------------ 
  :coverage | null
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close