2020-07-13 13:01:35 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [Protocol ](./puppeteer.protocol.md ) > [CSS ](./puppeteer.protocol.css.md )
## Protocol.CSS namespace
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.
< b > Signature:< / b >
```typescript
export namespace CSS
```
2020-07-20 15:17:06 +00:00
## Enumerations
| Enumeration | Description |
| --- | --- |
| [CSSMediaSource ](./puppeteer.protocol.css.cssmediasource.md ) | |
2020-07-13 13:01:35 +00:00
## Interfaces
| Interface | Description |
| --- | --- |
| [AddRuleRequest ](./puppeteer.protocol.css.addrulerequest.md ) | |
| [AddRuleResponse ](./puppeteer.protocol.css.addruleresponse.md ) | |
| [CollectClassNamesRequest ](./puppeteer.protocol.css.collectclassnamesrequest.md ) | |
| [CollectClassNamesResponse ](./puppeteer.protocol.css.collectclassnamesresponse.md ) | |
| [CreateStyleSheetRequest ](./puppeteer.protocol.css.createstylesheetrequest.md ) | |
| [CreateStyleSheetResponse ](./puppeteer.protocol.css.createstylesheetresponse.md ) | |
| [CSSComputedStyleProperty ](./puppeteer.protocol.css.csscomputedstyleproperty.md ) | |
| [CSSKeyframeRule ](./puppeteer.protocol.css.csskeyframerule.md ) | CSS keyframe rule representation. |
| [CSSKeyframesRule ](./puppeteer.protocol.css.csskeyframesrule.md ) | CSS keyframes rule representation. |
| [CSSMedia ](./puppeteer.protocol.css.cssmedia.md ) | CSS media rule descriptor. |
| [CSSProperty ](./puppeteer.protocol.css.cssproperty.md ) | CSS property declaration data. |
| [CSSRule ](./puppeteer.protocol.css.cssrule.md ) | CSS rule representation. |
| [CSSStyle ](./puppeteer.protocol.css.cssstyle.md ) | CSS style representation. |
| [CSSStyleSheetHeader ](./puppeteer.protocol.css.cssstylesheetheader.md ) | CSS stylesheet metainformation. |
2020-09-09 19:23:46 +00:00
| [FontFace ](./puppeteer.protocol.css.fontface.md ) | Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html\#font-descriptions and additional information such as platformFontFamily and fontVariationAxes. |
2020-07-13 13:01:35 +00:00
| [FontsUpdatedEvent ](./puppeteer.protocol.css.fontsupdatedevent.md ) | Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font |
2020-09-09 19:23:46 +00:00
| [FontVariationAxis ](./puppeteer.protocol.css.fontvariationaxis.md ) | Information about font variation axes for variable fonts |
2020-07-13 13:01:35 +00:00
| [ForcePseudoStateRequest ](./puppeteer.protocol.css.forcepseudostaterequest.md ) | |
| [GetBackgroundColorsRequest ](./puppeteer.protocol.css.getbackgroundcolorsrequest.md ) | |
| [GetBackgroundColorsResponse ](./puppeteer.protocol.css.getbackgroundcolorsresponse.md ) | |
| [GetComputedStyleForNodeRequest ](./puppeteer.protocol.css.getcomputedstylefornoderequest.md ) | |
| [GetComputedStyleForNodeResponse ](./puppeteer.protocol.css.getcomputedstylefornoderesponse.md ) | |
| [GetInlineStylesForNodeRequest ](./puppeteer.protocol.css.getinlinestylesfornoderequest.md ) | |
| [GetInlineStylesForNodeResponse ](./puppeteer.protocol.css.getinlinestylesfornoderesponse.md ) | |
| [GetMatchedStylesForNodeRequest ](./puppeteer.protocol.css.getmatchedstylesfornoderequest.md ) | |
| [GetMatchedStylesForNodeResponse ](./puppeteer.protocol.css.getmatchedstylesfornoderesponse.md ) | |
| [GetMediaQueriesResponse ](./puppeteer.protocol.css.getmediaqueriesresponse.md ) | |
| [GetPlatformFontsForNodeRequest ](./puppeteer.protocol.css.getplatformfontsfornoderequest.md ) | |
| [GetPlatformFontsForNodeResponse ](./puppeteer.protocol.css.getplatformfontsfornoderesponse.md ) | |
| [GetStyleSheetTextRequest ](./puppeteer.protocol.css.getstylesheettextrequest.md ) | |
| [GetStyleSheetTextResponse ](./puppeteer.protocol.css.getstylesheettextresponse.md ) | |
| [InheritedStyleEntry ](./puppeteer.protocol.css.inheritedstyleentry.md ) | Inherited CSS rule collection from ancestor node. |
| [MediaQuery ](./puppeteer.protocol.css.mediaquery.md ) | Media query descriptor. |
| [MediaQueryExpression ](./puppeteer.protocol.css.mediaqueryexpression.md ) | Media query expression descriptor. |
| [PlatformFontUsage ](./puppeteer.protocol.css.platformfontusage.md ) | Information about amount of glyphs that were rendered with given font. |
| [PseudoElementMatches ](./puppeteer.protocol.css.pseudoelementmatches.md ) | CSS rule collection for a single pseudo style. |
| [RuleMatch ](./puppeteer.protocol.css.rulematch.md ) | Match data for a CSS rule. |
| [RuleUsage ](./puppeteer.protocol.css.ruleusage.md ) | CSS coverage information. |
| [SelectorList ](./puppeteer.protocol.css.selectorlist.md ) | Selector list data. |
| [SetEffectivePropertyValueForNodeRequest ](./puppeteer.protocol.css.seteffectivepropertyvaluefornoderequest.md ) | |
| [SetKeyframeKeyRequest ](./puppeteer.protocol.css.setkeyframekeyrequest.md ) | |
| [SetKeyframeKeyResponse ](./puppeteer.protocol.css.setkeyframekeyresponse.md ) | |
2020-09-09 19:23:46 +00:00
| [SetLocalFontsEnabledRequest ](./puppeteer.protocol.css.setlocalfontsenabledrequest.md ) | |
2020-07-13 13:01:35 +00:00
| [SetMediaTextRequest ](./puppeteer.protocol.css.setmediatextrequest.md ) | |
| [SetMediaTextResponse ](./puppeteer.protocol.css.setmediatextresponse.md ) | |
| [SetRuleSelectorRequest ](./puppeteer.protocol.css.setruleselectorrequest.md ) | |
| [SetRuleSelectorResponse ](./puppeteer.protocol.css.setruleselectorresponse.md ) | |
| [SetStyleSheetTextRequest ](./puppeteer.protocol.css.setstylesheettextrequest.md ) | |
| [SetStyleSheetTextResponse ](./puppeteer.protocol.css.setstylesheettextresponse.md ) | |
| [SetStyleTextsRequest ](./puppeteer.protocol.css.setstyletextsrequest.md ) | |
| [SetStyleTextsResponse ](./puppeteer.protocol.css.setstyletextsresponse.md ) | |
| [ShorthandEntry ](./puppeteer.protocol.css.shorthandentry.md ) | |
| [SourceRange ](./puppeteer.protocol.css.sourcerange.md ) | Text range within a resource. All numbers are zero-based. |
| [StopRuleUsageTrackingResponse ](./puppeteer.protocol.css.stopruleusagetrackingresponse.md ) | |
| [StyleDeclarationEdit ](./puppeteer.protocol.css.styledeclarationedit.md ) | A descriptor of operation to mutate style declaration text. |
| [StyleSheetAddedEvent ](./puppeteer.protocol.css.stylesheetaddedevent.md ) | Fired whenever an active document stylesheet is added. |
| [StyleSheetChangedEvent ](./puppeteer.protocol.css.stylesheetchangedevent.md ) | Fired whenever a stylesheet is changed as a result of the client operation. |
| [StyleSheetRemovedEvent ](./puppeteer.protocol.css.stylesheetremovedevent.md ) | Fired whenever an active document stylesheet is removed. |
2020-09-09 19:23:46 +00:00
| [TakeComputedStyleUpdatesResponse ](./puppeteer.protocol.css.takecomputedstyleupdatesresponse.md ) | |
2020-07-13 13:01:35 +00:00
| [TakeCoverageDeltaResponse ](./puppeteer.protocol.css.takecoveragedeltaresponse.md ) | |
2020-09-09 19:23:46 +00:00
| [TrackComputedStyleUpdatesRequest ](./puppeteer.protocol.css.trackcomputedstyleupdatesrequest.md ) | |
2020-07-13 13:01:35 +00:00
| [Value ](./puppeteer.protocol.css.value.md ) | Data for a simple selector (these are delimited by commas in a selector list). |
## Type Aliases
| Type Alias | Description |
| --- | --- |
| [StyleSheetId ](./puppeteer.protocol.css.stylesheetid.md ) | |
| [StyleSheetOrigin ](./puppeteer.protocol.css.stylesheetorigin.md ) | Stylesheet type: "injected" for stylesheets injected via extension, "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. |