跳到主要内容

CSS🧪

该域公开了CSS的读写操作。所有CSS对象(样式表、规则和样式)都有一个关联的id,用于后续对相关对象的操作。每种对象类型都有特定的id结构,这些结构在不同类型的对象之间不可互换。CSS对象可以通过get*ForNode()调用(接受DOM节点id)加载。客户端还可以通过styleSheetAdded/styleSheetRemoved事件跟踪样式表,随后使用getStyleSheet[Text]()方法加载所需的样式表内容。

EN
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.

✅️️ Methods

🔨CSS.addRule

在指定的 styleSheetId 样式表中,根据 location 指定的位置,插入一条包含给定 ruleText 的新规则。

EN
Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetIdcss样式表标识符,用于指定新规则应插入的位置。
ENThe css style sheet identifier where a new rule should be inserted.
ruleText✔️string新规则的文本。
ENThe text of a new rule.
location✔️SourceRange目标样式表中新规则的文本位置。
ENText position of a new rule in the target style sheet.
nodeForPropertySyntaxValidation🧪DOM.NodeId注册属性自定义属性声明的验证应在哪个DOM节点的上下文中进行,其NodeId。如果省略,新规则文本中的声明只能进行静态验证,例如,如果声明包含var(),则可能产生不正确的结果。
ENNodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
返回对象类型描述原文
ruleCSSRule新创建的规则。
ENThe newly created rule.

🔨CSS.collectClassNames

从指定样式表中返回所有类名。

EN
Returns all class names from specified stylesheet.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
返回对象类型描述原文
classNamesarray[string]类名列表。
ENClass name list.

🔨CSS.createStyleSheet

在给定的 frameId 框架中创建一个新的特殊 "via-inspector" 样式表。

EN
Creates a new special "via-inspector" stylesheet in the frame with given frameId.
参数必填标记类型描述原文
frameId✔️Page.FrameId应在其中创建“via-inspector”样式表的框架标识符。
ENIdentifier of the frame where "via-inspector" stylesheet should be created.
forceboolean如果为真,每次调用都会创建一个新的样式表。如果为假,则返回先前通过调用(force=false)为该框架文档创建的样式表(如果存在),否则创建一个新的样式表(默认值:false)。
ENIf true, creates a new stylesheet for every call. If false, returns a stylesheet previously created by a call with force=false for the frame's document if it exists or creates a new stylesheet (default: false).
返回对象类型描述原文
styleSheetIdDOM.StyleSheetId创建的“via-inspector”样式表的标识符。
ENIdentifier of the created "via-inspector" stylesheet.

🔨CSS.disable

禁用给定页面的CSS代理。

EN
Disables the CSS agent for the given page.

🔨CSS.enable

为给定页面启用CSS代理。在收到此命令的结果之前,客户端不应假定CSS代理已启用。

EN
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.

🔨CSS.forcePseudoState

确保在浏览器计算其样式时,给定节点将具有指定的伪类。

EN
Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId要强制应用伪状态的目标元素ID。
ENThe element id for which to force the pseudo state.
forcedPseudoClasses✔️array[string]在计算元素的样式时强制应用的伪类。
ENElement pseudo classes to force when computing the element's style.

🔨CSS.forceStartingStyle

确保给定节点处于其起始样式状态。

EN
Ensures that the given node is in its starting-style state.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId要强制应用起始样式状态的元素ID。
ENThe element id for which to force the starting-style state.
forced✔️boolean表示此功能是开启还是关闭的布尔值。
ENBoolean indicating if this is on or off.

🔨CSS.getBackgroundColors

参数必填标记类型描述原文
nodeId✔️DOM.NodeId获取背景颜色的节点ID。
ENId of the node to get background colors for.
返回对象类型描述原文
backgroundColorsarray[string]该元素背景色的范围,如果它包含任何可见文本。如果没有可见文本,此项将为undefined。对于纯色背景,此项将仅包含该颜色。对于渐变背景,此项将包含每个颜色断点。对于更复杂的情况,此项将为空数组。图像将被忽略(如同图像加载失败)。
ENThe 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).
computedFontSizestring此节点的计算字体大小,以CSS计算值字符串形式表示(例如'12px')。
ENThe computed font size for this node, as a CSS computed value string (e.g. '12px').
computedFontWeightstring此节点的计算字体粗细,以CSS计算值字符串形式表示(例如'normal'或'100')。
ENThe computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').

🔨CSS.getComputedStyleForNode

返回由 nodeId 标识的 DOM 节点的计算样式。

EN
Returns the computed style for a DOM node identified by nodeId.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId
返回对象类型描述原文
computedStylearray[CSSComputedStyleProperty]指定DOM节点的计算样式。
ENComputed style for the specified DOM node.
extraFieldsComputedStyleExtraFields一份非标准的"额外字段"列表,这些字段由Blink引擎存储在每个计算样式旁边。
ENA list of non-standard "extra fields" which blink stores alongside each computed style.

🔨CSS.getInlineStylesForNode

返回由nodeId标识的DOM节点的内联样式(明确在"style"属性中定义以及通过DOM属性隐式定义的样式)。

EN
Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId
返回对象类型描述原文
inlineStyleCSSStyle为指定的DOM节点应用内联样式。
ENInline style for the specified DOM node.
attributesStyleCSSStyle属性定义的元素样式(例如,由 "width=20 height=100%" 产生的结果)。
ENAttribute-defined element style (e.g. resulting from "width=20 height=100%").

🔨CSS.getMatchedStylesForNode

返回由 nodeId 标识的 DOM 节点的请求样式。

EN
Returns requested styles for a DOM node identified by nodeId.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId
返回对象类型描述原文
inlineStyleCSSStyle为指定的DOM节点设置内联样式。
ENInline style for the specified DOM node.
attributesStyleCSSStyle属性定义的元素样式(例如,由“width=20 height=100%”产生的样式)。
ENAttribute-defined element style (e.g. resulting from "width=20 height=100%").
matchedCSSRulesarray[RuleMatch]匹配此节点的CSS规则,来自所有适用的样式表。
ENCSS rules matching this node, from all applicable stylesheets.
pseudoElementsarray[PseudoElementMatches]此节点的伪样式匹配。
ENPseudo style matches for this node.
inheritedarray[InheritedStyleEntry]一个继承样式的链条(从直接节点父级向上至DOM树根节点)。
ENA chain of inherited styles (from the immediate node parent up to the DOM tree root).
inheritedPseudoElementsarray[InheritedPseudoElementMatches]一个继承的伪元素样式链(从直接节点父级向上直到DOM树根)。
ENA chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
cssKeyframesRulesarray[CSSKeyframesRule]与此节点匹配的CSS关键帧动画列表。
ENA list of CSS keyframed animations matching this node.
cssPositionTryRulesarray[CSSPositionTryRule]基于position-try-fallbacks属性,匹配此节点的CSS @position-try规则列表。
ENA list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.
activePositionFallbackIndexinteger在应用的 position-try-fallback 属性中,活动回退的索引,如果没有活动的 position-try 回退,则不会设置。
ENIndex of the active fallback in the applied position-try-fallback property, will not be set if there is no active position-try fallback.
cssPropertyRulesarray[CSSPropertyRule]与此节点匹配的CSS at-property规则列表。
ENA list of CSS at-property rules matching this node.
cssPropertyRegistrationsarray[CSSPropertyRegistration]与此节点匹配的CSS属性注册列表。
ENA list of CSS property registrations matching this node.
cssAtRulesarray[CSSAtRule]一个简单的@规则列表,匹配此节点或其伪元素。
ENA list of simple @rules matching this node or its pseudo-elements.
parentLayoutNodeIdDOM.NodeId第一个不具有 display: contents 样式的父元素的 Id。
ENId of the first parent element that does not have display: contents.
cssFunctionRulesarray[CSSFunctionRule]此节点样式引用的CSS at-function规则列表。
ENA list of CSS at-function rules referenced by styles of this node.

🔨CSS.getMediaQueries

返回由渲染引擎解析的所有媒体查询。

EN
Returns all media queries parsed by the rendering engine.
返回对象类型描述原文
mediasarray[CSSMedia]

🔨CSS.getPlatformFontsForNode

获取用于渲染给定节点中子文本节点的平台字体信息。

EN
Requests information about platform fonts which we used to render child TextNodes in the given node.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId
返回对象类型描述原文
fontsarray[PlatformFontUsage]每个已使用平台字体的使用统计。
ENUsage statistics for every employed platform font.

🔨CSS.getStyleSheetText

返回样式表的当前文本内容。

EN
Returns the current textual content for a stylesheet.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
返回对象类型描述原文
textstring样式表文本。
ENThe stylesheet text.

🔨CSS.setEffectivePropertyValueForNode

为给定节点查找具有指定活动属性的规则,并为此属性设置新值

EN
Find a rule with the given active property for the given node and set the new value for this property
参数必填标记类型描述原文
nodeId✔️DOM.NodeId要设置属性的元素ID。
ENThe element id for which to set property.
propertyName✔️string
value✔️string

🔨CSS.setKeyframeKey

修改关键帧规则的关键文本。

EN
Modifies the keyframe rule key text.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
keyText✔️string
返回对象类型描述原文
keyTextValue修改后的密钥文本。
ENThe resulting key text after modification.

🔨CSS.setMediaText

修改规则选择器。

EN
Modifies the rule selector.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
text✔️string
返回对象类型描述原文
mediaCSSMedia修改后的CSS媒体规则。
ENThe resulting CSS media rule after modification.

🔨CSS.setPropertyRulePropertyName

修改属性规则的属性名称。

EN
Modifies the property rule property name.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
propertyName✔️string
返回对象类型描述原文
propertyNameValue修改后的密钥文本。
ENThe resulting key text after modification.

🔨CSS.setRuleSelector

修改规则选择器。

EN
Modifies the rule selector.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
selector✔️string
返回对象类型描述原文
selectorListSelectorList修改后的选择器列表。
ENThe resulting selector list after modification.

🔨CSS.setStyleSheetText

设置新的样式表文本。

EN
Sets the new stylesheet text.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
text✔️string
返回对象类型描述原文
sourceMapURLstring与脚本关联的源映射的URL(如果有的话)。
ENURL of source map associated with script (if any).

🔨CSS.setStyleTexts

在给定的顺序中,依次应用指定的样式编辑。

EN
Applies specified style edits one after another in the given order.
参数必填标记类型描述原文
edits✔️array[StyleDeclarationEdit]
nodeForPropertySyntaxValidation🧪DOM.NodeId注册属性自定义属性声明的验证应在哪个DOM节点的上下文中进行,其NodeId。如果省略,新规则文本中的声明只能进行静态验证,例如,如果声明包含var(),则可能产生不正确的结果。
ENNodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
返回对象类型描述原文
stylesarray[CSSStyle]修改后的样式结果。
ENThe resulting styles after modification.

🔨CSS.startRuleUsageTracking

启用选择器录制功能。

EN
Enables the selector recording.

🔨CSS.stopRuleUsageTracking

停止跟踪规则使用情况,并返回自上次调用 takeCoverageDelta(或自覆盖率检测开始以来)以来使用的规则列表。

EN
Stop tracking rule usage and return the list of rules that were used since last call to takeCoverageDelta (or since start of coverage instrumentation).
返回对象类型描述原文
ruleUsagearray[RuleUsage]

🔨CSS.takeCoverageDelta

获取自上次调用此方法(或自覆盖率检测开始)以来开始使用的规则列表。

EN
Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation).
返回对象类型描述原文
coveragearray[RuleUsage]
timestampnumber单调递增时间,单位为秒。
ENMonotonically increasing time, in seconds.

🔨CSS.getAnimatedStylesForNode🧪

返回来自动画和过渡的样式,包括继承链中的动画和过渡样式。

EN
Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId
返回对象类型描述原文
animationStylesarray[CSSAnimationStyle]来自动画的样式。
ENStyles coming from animations.
transitionsStyleCSSStyle样式来自过渡效果。
ENStyle coming from transitions.
inheritedarray[InheritedAnimatedStyleEntry]元素继承链中动画样式和过渡样式的继承样式条目。
ENInherited style entries for animationsStyle and transitionsStyle from the inheritance chain of the element.

🔨CSS.getEnvironmentVariables🧪

返回在env()中使用的默认UA定义环境变量的值

EN
Returns the values of the default UA-defined environment variables used in env()
返回对象类型描述原文
environmentVariablesobject

🔨CSS.getLayersForNode🧪

返回渲染引擎为节点树作用域解析的所有层。给定一个由nodeId标识的DOM元素,getLayersForNode将返回最近祖先文档或影子根的根层。该层根包含树作用域的完整层树及其顺序。

EN
Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.
参数必填标记类型描述原文
nodeId✔️DOM.NodeId
返回对象类型描述原文
rootLayerCSSLayerData

🔨CSS.getLocationForSelector🧪

给定一个CSS选择器文本和一个样式表ID,getLocationForSelector 返回该CSS选择器在样式表中的位置数组。

EN
Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
selectorText✔️string
返回对象类型描述原文
rangesarray[SourceRange]

🔨CSS.getLonghandProperties🧪

参数必填标记类型描述原文
shorthandName✔️string
value✔️string
返回对象类型描述原文
longhandPropertiesarray[CSSProperty]

🔨CSS.resolveValues🧪

在提供的元素上下文中解析指定值。例如,'1em' 的值将根据元素计算后的 'font-size' 进行评估,而 'calc(1px + 2px)' 的值将被解析为 '3px'。如果指定了 propertyName,则 values 将按照属性声明的规则进行解析。如果某个值无法根据提供的属性语法进行解析,则使用组合语法进行解析,就像未提供 propertyName 一样。如果即使如此仍无法解析该值,则返回提供的值而不做任何更改。注意:此函数当前不解析 CSS random() 函数,它返回未修改的 random() 函数部分。

EN
Resolve the specified values in the context of the provided element. For example, a value of '1em' is evaluated according to the computed 'font-size' of the element and a value 'calc(1px + 2px)' will be resolved to '3px'. If the propertyName was specified the values are resolved as if they were property's declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null propertyName was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.`
参数必填标记类型描述原文
values✔️array[string]级联依赖的关键字(revert/revert-layer)不起作用。
ENCascade-dependent keywords (revert/revert-layer) do not work.
nodeId✔️DOM.NodeId在节点上下文中评估表达式的ID
ENId of the node in whose context the expression is evaluated
propertyNamestring仅接受长手属性和自定义属性名称。
ENOnly longhands and custom property names are accepted.
pseudoTypeDOM.PseudoType伪元素类型,仅适用于在树中生成元素的伪元素,例如::before和::after。
ENPseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
pseudoIdentifierstring伪元素自定义标识符。
ENPseudo element custom ident.
返回对象类型描述原文
resultsarray[string]

🔨CSS.setContainerQueryText🧪

修改容器查询的表达式。

EN
Modifies the expression of a container query.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
text✔️string
返回对象类型描述原文
containerQueryCSSContainerQuery修改后的CSS容器查询规则。
ENThe resulting CSS container query rule after modification.

🔨CSS.setLocalFontsEnabled🧪

启用/禁用本地CSS字体的渲染(默认启用)。

EN
Enables/disables rendering of local CSS fonts (enabled by default).
参数必填标记类型描述原文
enabled✔️boolean是否启用本地字体渲染。
ENWhether rendering of local fonts is enabled.

🔨CSS.setNavigationText🧪

修改导航规则的表达式。

EN
Modifies the expression of a navigation at-rule.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
text✔️string
返回对象类型描述原文
navigationCSSNavigation修改后得到的CSS导航规则。
ENThe resulting CSS Navigation rule after modification.

🔨CSS.setScopeText🧪

修改作用域规则(scope at-rule)的表达式。

EN
Modifies the expression of a scope at-rule.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
text✔️string
返回对象类型描述原文
scopeCSSScope修改后的CSS Scope规则。
ENThe resulting CSS Scope rule after modification.

🔨CSS.setSupportsText🧪

修改一个@supports规则的表达式。

EN
Modifies the expression of a supports at-rule.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId
range✔️SourceRange
text✔️string
返回对象类型描述原文
supportsCSSSupports修改后的CSS Supports规则。
ENThe resulting CSS Supports rule after modification.

🔨CSS.takeComputedStyleUpdates🧪

轮询下一批计算出的样式更新。

EN
Polls the next batch of computed style updates.
返回对象类型描述原文
nodeIdsarray[DOM.NodeId]已更新追踪计算样式的节点ID列表。
ENThe list of node Ids that have their tracked computed styles updated.

🔨CSS.trackComputedStyleUpdates🧪

开始追踪指定计算样式的更新。指定的属性数组将替换先前设定的数组。传入空数组以禁用追踪。使用takeComputedStyleUpdates可获取已修改属性的节点列表。仅对通过DOM代理推送至前端的节点进行计算样式属性变更的追踪。若节点推送至前端后追踪属性未发生变化,则不会为该节点发布更新。

EN
Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.
参数必填标记类型描述原文
propertiesToTrack✔️array[CSSComputedStyleProperty]

🔨CSS.trackComputedStyleUpdatesForNode🧪

开始跟踪指定节点以获取计算样式更新,每当节点的计算样式更新时,它会以节流方式排队一个computedStyleUpdated事件。每次只能跟踪一个节点以获取计算样式更新,因此传递新的节点ID将取消对先前节点的跟踪。传递undefined以禁用跟踪。

EN
Starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a computedStyleUpdated event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass undefined to disable tracking.
参数必填标记类型描述原文
nodeIdDOM.NodeId

✅️️ Events

👋CSS.fontsUpdated

每当网页字体更新时触发。非空的 font 参数表示网页字体已成功加载。

EN
Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font.
参数必填标记类型描述原文
fontFontFace已加载的网页字体。
ENThe web font that has loaded.

👋CSS.mediaQueryResultChanged

每当媒体查询结果发生变化时触发(例如,浏览器窗口调整大小后)。当前实现仅考虑与视口相关的媒体特性。

EN
Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.

👋CSS.styleSheetAdded

每当添加一个活动文档样式表时触发。

EN
Fired whenever an active document stylesheet is added.
参数必填标记类型描述原文
header✔️CSSStyleSheetHeader已添加样式表元信息。
ENAdded stylesheet metainfo.

👋CSS.styleSheetChanged

每当样式表因客户端操作而更改时触发。

EN
Fired whenever a stylesheet is changed as a result of the client operation.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId

👋CSS.styleSheetRemoved

每当一个活动的文档样式表被移除时触发。

EN
Fired whenever an active document stylesheet is removed.
参数必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId被移除样式表的标识符。
ENIdentifier of the removed stylesheet.

👋CSS.computedStyleUpdated🧪

参数必填标记类型描述原文
nodeId✔️DOM.NodeId已更新计算样式的节点ID。
ENThe node id that has updated computed styles.

✅️️ Types

📌CSS.CSSAnimationStyle

CSS样式来源于具有动画名称的动画。

EN
CSS style coming from animations with the name of the animation.

返回类型:object

属性必填标记类型描述原文
namestring动画的名称。
ENThe name of the animation.
style✔️CSSStyle动画带来的样式。
ENThe style coming from the animation.

📌CSS.CSSAtRule

CSS通用@规则表示。

EN
CSS generic @rule representation.

返回类型:object

属性必填标记类型描述原文
type✔️stringAt-rule 类型。
允许的值:font-facefont-feature-valuesfont-palette-values
ENType of at-rule.
Allowed Values: font-face, font-feature-values, font-palette-values
subsectionstringfont-feature-values的子部分(如果这是一个子部分)。
允许的值:swashannotationornamentsstylisticstylesetcharacter-variant
ENSubsection of font-feature-values, if this is a subsection.
Allowed Values: swash, annotation, ornaments, stylistic, styleset, character-variant
nameValue关联名称(如适用)。
ENAssociated name, if applicable.
styleSheetIdDOM.StyleSheetId该规则来源的CSS样式表标识符(用户代理样式表和用户指定的样式表规则中不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
origin✔️StyleSheetOrigin父样式表的来源。
ENParent stylesheet's origin.
style✔️CSSStyle关联样式声明。
ENAssociated style declaration.

📌CSS.CSSComputedStyleProperty

返回类型:object

属性必填标记类型描述原文
name✔️string计算样式属性名称。
ENComputed style property name.
value✔️string计算样式属性值。
ENComputed style property value.

📌CSS.CSSFunctionConditionNode

CSS函数条件块表示。

EN
CSS function conditional block representation.

返回类型:object

属性必填标记类型描述原文
mediaCSSMedia此条件块的媒体查询。仅应设置一种类型的条件。
ENMedia query for this conditional block. Only one type of condition should be set.
containerQueriesCSSContainerQuery此条件块的容器查询。仅应设置一种条件类型。
ENContainer query for this conditional block. Only one type of condition should be set.
supportsCSSSupports@supports CSS 条件规则。仅应设置一种类型的条件。
EN@supports CSS at-rule condition. Only one type of condition should be set.
navigationCSSNavigation@navigation 条件。只能设置一种类型的条件。
EN@navigation condition. Only one type of condition should be set.
children✔️array[CSSFunctionNode]块体。
ENBlock body.
conditionText✔️string条件文本。
ENThe condition text.

📌CSS.CSSFunctionNode

CSS 函数规则主体的部分。

EN
Section of the body of a CSS function rule.

返回类型:object

属性必填标记类型描述原文
conditionCSSFunctionConditionNode一个条件块。如果设置了,就不应设置样式。
ENA conditional block. If set, style should not be set.
styleCSSStyle此节点设置的值。如果设置了,则不应设置条件。
ENValues set by this node. If set, condition should not be set.

📌CSS.CSSFunctionParameter

CSS函数参数表示法。

EN
CSS function argument representation.

返回类型:object

属性必填标记类型描述原文
name✔️string参数名称。
ENThe parameter name.
type✔️string参数类型。
ENThe parameter type.

📌CSS.CSSFunctionRule

CSS 函数 at-rule 表示。

EN
CSS function at-rule representation.

返回类型:object

属性必填标记类型描述原文
name✔️Value函数名称。
ENName of the function.
styleSheetIdDOM.StyleSheetId此规则来源的CSS样式表标识符(对于用户代理样式表和用户指定的样式表规则不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
origin✔️StyleSheetOrigin父样式表的来源。
ENParent stylesheet's origin.
parameters✔️array[CSSFunctionParameter]参数列表。
ENList of parameters.
children✔️array[CSSFunctionNode]函数体。
ENFunction body.

📌CSS.CSSKeyframeRule

CSS关键帧规则表示。

EN
CSS keyframe rule representation.

返回类型:object

属性必填标记类型描述原文
styleSheetIdDOM.StyleSheetId此规则源自的CSS样式表标识符(用户代理样式表和用户指定的样式表规则中不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
origin✔️StyleSheetOrigin父样式表的来源。
ENParent stylesheet's origin.
keyText✔️Value关联键文本。
ENAssociated key text.
style✔️CSSStyle关联的样式声明。
ENAssociated style declaration.

📌CSS.CSSKeyframesRule

CSS关键帧规则表示。

EN
CSS keyframes rule representation.

返回类型:object

属性必填标记类型描述原文
animationName✔️Value动画名称。
ENAnimation name.
keyframes✔️array[CSSKeyframeRule]关键帧列表。
ENList of keyframes.

📌CSS.CSSMedia

CSS媒体规则描述符。

EN
CSS media rule descriptor.

返回类型:object

属性必填标记类型描述原文
text✔️string媒体查询文本。
ENMedia query text.
source✔️string媒体查询的来源:若由 @media 规则指定则为 "mediaRule",若由 @import 规则指定则为 "importRule",若由链接样式表 LINK 标签中的 "media" 属性指定则为 "linkedSheet",若由内联样式表 STYLE 标签中的 "media" 属性指定则为 "inlineSheet"。
允许的取值:mediaRuleimportRulelinkedSheetinlineSheet
ENSource of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
Allowed Values: mediaRule, importRule, linkedSheet, inlineSheet
sourceURLstring包含媒体查询描述的文档的URL。
ENURL of the document containing the media query description.
rangeSourceRange关联规则(@media 或 @import)在所属样式表中的标题范围(如果可用)。
ENThe associated rule (@media or @import) header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).
mediaListarray[MediaQuery]媒体查询数组。
ENArray of media queries.

📌CSS.CSSPositionTryRule

CSS @position-try 规则表示。

EN
CSS @position-try rule representation.

返回类型:object

属性必填标记类型描述原文
name✔️Value前导虚线标识符名称
ENThe prelude dashed-ident name
styleSheetIdDOM.StyleSheetId此规则源自的CSS样式表标识符(对于用户代理样式表和用户指定的样式表规则,此标识符不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
origin✔️StyleSheetOrigin父样式表的来源。
ENParent stylesheet's origin.
style✔️CSSStyle关联的样式声明。
ENAssociated style declaration.
active✔️boolean

📌CSS.CSSProperty

CSS属性声明数据。

EN
CSS property declaration data.

返回类型:object

属性必填标记类型描述原文
name✔️string属性名称。
ENThe property name.
value✔️string属性值。
ENThe property value.
importantboolean该属性是否带有"!important"注解(如果不存在,则隐含为false)。
ENWhether the property has "!important" annotation (implies false if absent).
implicitboolean该属性是否为隐式(如果不存在,则隐含 false)。
ENWhether the property is implicit (implies false if absent).
textstring完整的属性文本,如样式中所指定的。
ENThe full property text as specified in the style.
parsedOkboolean该属性是否被浏览器理解(如果缺失则隐含为true)。
ENWhether the property is understood by the browser (implies true if absent).
disabledboolean该属性是否被用户禁用(仅适用于基于源的属性)。
ENWhether the property is disabled by the user (present for source-based properties only).
rangeSourceRange包含在封闭样式声明中的整个属性范围(如果可用)。
ENThe entire property range in the enclosing style declaration (if available).
longhandProperties🧪array[CSSProperty]如果此属性是简写属性,则解析其长格式组成部分。如果给定的属性不是简写属性,此字段将为空。
ENParsed longhand components of this property if it is a shorthand. This field will be empty if the given property is not a shorthand.

📌CSS.CSSPropertyRegistration

通过CSS.registerProperty进行自定义属性注册的表示

EN
Representation of a custom property registration through CSS.registerProperty

返回类型:object

属性必填标记类型描述原文
propertyName✔️string
initialValueValue
inherits✔️boolean
syntax✔️string

📌CSS.CSSPropertyRule

CSS属性@规则表示。

EN
CSS property at-rule representation.

返回类型:object

属性必填标记类型描述原文
styleSheetIdDOM.StyleSheetId此规则来源的CSS样式表标识符(对于用户代理样式表和用户指定的样式表规则,此标识符不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
origin✔️StyleSheetOrigin父级样式表的来源。
ENParent stylesheet's origin.
propertyName✔️Value关联属性名称。
ENAssociated property name.
style✔️CSSStyle关联的样式声明。
ENAssociated style declaration.

📌CSS.CSSRule

CSS规则表示。

EN
CSS rule representation.

返回类型:object

属性必填标记类型描述原文
styleSheetIdDOM.StyleSheetId此规则来源的CSS样式表标识符(用户代理样式表和用户指定样式表规则中不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
selectorList✔️SelectorList规则选择器数据。
ENRule selector data.
nestingSelectors🧪array[string]从祖先样式规则中选择器的数组,按与当前规则的距离排序。
ENArray of selectors from ancestor style rules, sorted by distance from the current rule.
origin✔️StyleSheetOrigin父样式表的来源。
ENParent stylesheet's origin.
style✔️CSSStyle关联的样式声明。
ENAssociated style declaration.
originTreeScopeNodeId🧪DOM.BackendNodeId构成此规则起源树作用域的DOM节点的BackendNodeId。
ENThe BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
mediaarray[CSSMedia]媒体列表数组(用于涉及媒体查询的规则)。该数组枚举媒体查询,从最内层开始,逐层向外。
ENMedia list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
containerQueries🧪array[CSSContainerQuery]容器查询列表数组(适用于涉及容器查询的规则)。该数组枚举容器查询,从最内层开始,向外扩展。
ENContainer query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
supports🧪array[CSSSupports]@supports CSS 规则数组。该数组枚举了从最内层开始向外扩展的 @supports 规则。
EN@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
layers🧪array[CSSLayer]层叠层数组。包含此规则所属的层叠层次结构,从最内层开始向外延伸。
ENCascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
scopes🧪array[CSSScope]@scope CSS at-rule 数组。该数组按从最内层到最外层的顺序枚举 @scope at-rules。
EN@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
ruleTypes🧪array[CSSRuleType]该数组按从最内层到最外层的顺序保存祖先CSSRules的类型。
ENThe array keeps the types of ancestor CSSRules from the innermost going outwards.
startingStyles🧪array[CSSStartingStyle]@starting-style CSS at-rule 数组。该数组枚举了从最内层开始向外扩展的 @starting-style at-rules。
EN@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.
navigations🧪array[CSSNavigation]@navigation CSS 规则数组。该数组枚举了从最内层开始向外扩展的 @navigation 规则。
EN@navigation CSS at-rule array. The array enumerates @navigation at-rules starting with the innermost one, going outwards.

📌CSS.CSSStyle

CSS 样式表示。

EN
CSS style representation.

返回类型:object

属性必填标记类型描述原文
styleSheetIdDOM.StyleSheetId此规则来源的CSS样式表标识符(用户代理样式表和用户指定样式表规则中不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
cssProperties✔️array[CSSProperty]样式中的CSS属性。
ENCSS properties in the style.
shorthandEntries✔️array[ShorthandEntry]样式中所发现的所有简写属性的计算值。
ENComputed values for all shorthands found in the style.
cssTextstring样式声明文本(如果可用)。
ENStyle declaration text (if available).
rangeSourceRange封闭样式表中的样式声明范围(如果可用)。
ENStyle declaration range in the enclosing stylesheet (if available).

📌CSS.CSSStyleSheetHeader

CSS样式表的元信息。

EN
CSS stylesheet metainformation.

返回类型:object

属性必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId样式表标识符。
ENThe stylesheet identifier.
frameId✔️Page.FrameId所有者框架标识符。
ENOwner frame identifier.
sourceURL✔️string样式表资源 URL。如果这是使用 new CSSStyleSheet() 创建的构造样式表,则为空(但如果这是作为 CSS 模块脚本导入的构造样式表,则非空)。
ENStylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script).
sourceMapURLstring与样式表关联的源映射的URL(如果有的话)。
ENURL of source map associated with the stylesheet (if any).
origin✔️StyleSheetOrigin样式表来源。
ENStylesheet origin.
title✔️string样式表标题。
ENStylesheet title.
ownerNodeDOM.BackendNodeId样式表所有者节点的后端ID。
ENThe backend id for the owner node of the stylesheet.
disabled✔️boolean表示样式表是否被禁用。
ENDenotes whether the stylesheet is disabled.
hasSourceURLboolean源URL字段值是否来自sourceURL注释。
ENWhether the sourceURL field value comes from the sourceURL comment.
isInline✔️boolean此样式表是否由解析器为 STYLE 标签创建。对于通过 document.write 创建的 STYLE 标签,此标志不会被设置。
ENWhether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
isMutable✔️boolean该样式表是否可变。内联样式表在通过CSSOM API修改后会变为可变。<link>元素的样式表仅在DevTools修改它们时才变为可变。构造的样式表(new CSSStyleSheet())在创建后立即可变。
ENWhether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. <link> element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
isConstructed✔️boolean如果此样式表是通过 new CSSStyleSheet() 创建或作为 CSS 模块脚本导入,则为 true。
ENTrue if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.
startLine✔️number样式表在资源中的行偏移量(从零开始计数)。
ENLine offset of the stylesheet within the resource (zero based).
startColumn✔️number样式表在资源中的列偏移量(从零开始计数)。
ENColumn offset of the stylesheet within the resource (zero based).
length✔️number内容的大小(以字符计)。
ENSize of the content (in characters).
endLine✔️number样式表在资源中结束的行偏移量(从零开始计数)。
ENLine offset of the end of the stylesheet within the resource (zero based).
endColumn✔️number样式表在资源中结束位置的列偏移量(从零开始计数)。
ENColumn offset of the end of the stylesheet within the resource (zero based).
loadingFailed🧪boolean如果样式表是从网络资源加载的,这表示资源加载失败的时间
ENIf the style sheet was loaded from a network resource, this indicates when the resource failed to load

📌CSS.CSSTryRule

CSS try规则表示。

EN
CSS try rule representation.

返回类型:object

属性必填标记类型描述原文
styleSheetIdDOM.StyleSheetId该规则源自的CSS样式表标识符(对于用户代理样式表和用户指定的样式表规则,此标识符不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
origin✔️StyleSheetOrigin父样式表的来源。
ENParent stylesheet's origin.
style✔️CSSStyle关联样式声明。
ENAssociated style declaration.

📌CSS.FontFace

网页字体的属性:https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions 以及额外信息,例如 platformFontFamily 和 fontVariationAxes。

EN
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.

返回类型:object

属性必填标记类型描述原文
fontFamily✔️string字体族。
ENThe font-family.
fontStyle✔️string字体样式。
ENThe font-style.
fontVariant✔️string字体变体。
ENThe font-variant.
fontWeight✔️string字体粗细。
ENThe font-weight.
fontStretch✔️string字体拉伸。
ENThe font-stretch.
fontDisplay✔️string字体显示。
ENThe font-display.
unicodeRange✔️stringunicode-range。
ENThe unicode-range.
src✔️stringThe src.
ENThe src.
platformFontFamily✔️string已解析的平台字体族
ENThe resolved platform font family
fontVariationAxesarray[FontVariationAxis]可用变体设置(亦称"axes")。
ENAvailable variation settings (a.k.a. "axes").

📌CSS.FontVariationAxis

关于可变字体字体变化轴的信息

EN
Information about font variation axes for variable fonts

返回类型:object

属性必填标记类型描述原文
tag✔️string字体变体设置标签(亦称“轴标签”)。
ENThe font-variation-setting tag (a.k.a. "axis tag").
name✔️string默认语言下的人类可读变体名称(通常为"en")。
ENHuman-readable variation name in the default language (normally, "en").
minValue✔️number该字体支持此标签的最小值(包含)。
ENThe minimum value (inclusive) the font supports for this tag.
maxValue✔️number该字体支持此标签的最大值(含上限)。
ENThe maximum value (inclusive) the font supports for this tag.
defaultValue✔️number默认值。
ENThe default value.

📌CSS.InheritedAnimatedStyleEntry

从祖先节点继承的动画样式CSS样式集合。

EN
Inherited CSS style collection for animated styles from ancestor node.

返回类型:object

属性必填标记类型描述原文
animationStylesarray[CSSAnimationStyle]来自样式继承链中祖先动画(如果有)的样式。
ENStyles coming from the animations of the ancestor, if any, in the style inheritance chain.
transitionsStyleCSSStyle样式继承链中来自祖先(如果有的话)过渡的样式。
ENThe style coming from the transitions of the ancestor, if any, in the style inheritance chain.

📌CSS.InheritedPseudoElementMatches

继承自祖先节点伪元素的伪元素匹配。

EN
Inherited pseudo element matches from pseudos of an ancestor node.

返回类型:object

属性必填标记类型描述原文
pseudoElements✔️array[PseudoElementMatches]祖先节点伪类中的伪样式匹配。
ENMatches of pseudo styles from the pseudos of an ancestor node.

📌CSS.InheritedStyleEntry

从祖先节点继承的CSS规则集合。

EN
Inherited CSS rule collection from ancestor node.

返回类型:object

属性必填标记类型描述原文
inlineStyleCSSStyle在样式继承链中,祖先节点的内联样式(如果有的话)。
ENThe ancestor node's inline style, if any, in the style inheritance chain.
matchedCSSRules✔️array[RuleMatch]匹配样式继承链中祖先节点的CSS规则。
ENMatches of CSS rules matching the ancestor node in the style inheritance chain.

📌CSS.MediaQuery

媒体查询描述符。

EN
Media query descriptor.

返回类型:object

属性必填标记类型描述原文
expressions✔️array[MediaQueryExpression]媒体查询表达式数组。
ENArray of media query expressions.
active✔️boolean媒体查询条件是否被满足。
ENWhether the media query condition is satisfied.

📌CSS.MediaQueryExpression

媒体查询表达式描述符。

EN
Media query expression descriptor.

返回类型:object

属性必填标记类型描述原文
value✔️number媒体查询表达式值。
ENMedia query expression value.
unit✔️string媒体查询表达式单位。
ENMedia query expression units.
feature✔️string媒体查询表达式功能。
ENMedia query expression feature.
valueRangeSourceRange关联值文本在包含样式表中的对应范围(如果可用)。
ENThe associated range of the value text in the enclosing stylesheet (if available).
computedLengthnumber媒体查询表达式的计算长度(如果适用)。
ENComputed length of media query expression (if applicable).

📌CSS.PlatformFontUsage

关于使用给定字体渲染的字形数量的信息。

EN
Information about amount of glyphs that were rendered with given font.

返回类型:object

属性必填标记类型描述原文
familyName✔️string平台报告的字体家族名称。
ENFont's family name reported by platform.
postScriptName✔️string平台报告的字体PostScript名称。
ENFont's PostScript name reported by platform.
isCustomFont✔️boolean指示字体是下载的还是本地解析的。
ENIndicates if the font was downloaded or resolved locally.
glyphCount✔️number使用此字体渲染的字形数量。
ENAmount of glyphs that were rendered with this font.

📌CSS.PseudoElementMatches

单个伪样式的CSS规则集合。

EN
CSS rule collection for a single pseudo style.

返回类型:object

属性必填标记类型描述原文
pseudoType✔️DOM.PseudoType伪元素类型。
ENPseudo element type.
pseudoIdentifierstring伪元素自定义标识符。
ENPseudo element custom ident.
matches✔️array[RuleMatch]适用于伪样式的CSS规则匹配。
ENMatches of CSS rules applicable to the pseudo style.

📌CSS.RuleMatch

CSS规则的匹配数据。

EN
Match data for a CSS rule.

返回类型:object

属性必填标记类型描述原文
rule✔️CSSRule匹配中的CSS规则。
ENCSS rule in the match.
matchingSelectors✔️array[integer]规则selectorList选择器中的匹配选择器索引(从0开始计数)。
ENMatching selector indices in the rule's selectorList selectors (0-based).

📌CSS.RuleUsage

CSS 覆盖率信息。

EN
CSS coverage information.

返回类型:object

属性必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetId此规则来源的CSS样式表标识符(对于用户代理样式表和用户指定的样式表规则,此标识符不存在)。
ENThe css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
startOffset✔️number规则(包括选择器)从样式表起始处的偏移量。
ENOffset of the start of the rule (including selector) from the beginning of the stylesheet.
endOffset✔️number规则体结束位置相对于样式表起始位置的偏移量。
ENOffset of the end of the rule body from the beginning of the stylesheet.
used✔️boolean表示该规则是否确实被页面中的某个元素所使用。
ENIndicates whether the rule was actually used by some element in the page.

📌CSS.SelectorList

选择器列表数据。

EN
Selector list data.

返回类型:object

属性必填标记类型描述原文
selectors✔️array[Value]列表中的选择器。
ENSelectors in the list.
text✔️string规则选择器文本。
ENRule selector text.

📌CSS.ShorthandEntry

返回类型:object

属性必填标记类型描述原文
name✔️string简称。
ENShorthand name.
value✔️string简写值。
ENShorthand value.
importantboolean该属性是否带有“!important”注解(若不存在则隐含false)。
ENWhether the property has "!important" annotation (implies false if absent).

📌CSS.SourceRange

资源内的文本范围。所有数字均从零开始计数。

EN
Text range within a resource. All numbers are zero-based.

返回类型:object

属性必填标记类型描述原文
startLine✔️integer范围起始行。
ENStart line of range.
startColumn✔️integer范围的起始列(包含)。
ENStart column of range (inclusive).
endLine✔️integer范围结束行
ENEnd line of range
endColumn✔️integer范围结束列(不包含)。
ENEnd column of range (exclusive).

📌CSS.StyleDeclarationEdit

一个用于修改样式声明文本的操作描述符。

EN
A descriptor of operation to mutate style declaration text.

返回类型:object

属性必填标记类型描述原文
styleSheetId✔️DOM.StyleSheetIdCSS样式表标识符。
ENThe css style sheet identifier.
range✔️SourceRange包含样式表中的样式文本的范围。
ENThe range of the style text in the enclosing stylesheet.
text✔️string新样式文本。
ENNew style text.

📌CSS.StyleSheetOrigin

样式表类型:通过扩展注入的样式表为 "injected",用户代理样式表为 "user-agent",由检查器创建的样式表(即包含“via inspector”规则的样式表)为 "inspector",常规样式表为 "regular"。
允许取值:injected, user-agent, inspector, regular

EN
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.
Allowed Values: injected, user-agent, inspector, regular

返回类型:string


📌CSS.Value

一个简单选择器的数据(这些在选择器列表中由逗号分隔)。

EN
Data for a simple selector (these are delimited by commas in a selector list).

返回类型:object

属性必填标记类型描述原文
text✔️string值文本。
ENValue text.
rangeSourceRange底层资源中的数值范围(如果可用)。
ENValue range in the underlying resource (if available).
specificity🧪Specificity选择器的特异性。
ENSpecificity of the selector.

📌CSS.ComputedStyleExtraFields🧪

返回类型:object

属性必填标记类型描述原文
isAppearanceBase✔️boolean返回此节点是否以基础外观进行渲染,这种情况发生在当该节点的外观属性设置为base/base-select时,或者当它位于以基础外观渲染的元素的子树中时。
ENReturns whether or not this node is being rendered with base appearance, which happens when it has its appearance property set to base/base-select or it is in the subtree of an element being rendered with base appearance.

📌CSS.CSSContainerQuery🧪

CSS容器查询规则描述符。

EN
CSS container query rule descriptor.

返回类型:object

属性必填标记类型描述原文
text✔️string容器查询文本。
ENContainer query text.
rangeSourceRange关联规则头部在包含它的样式表中的范围(如果可用)。
ENThe associated rule header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表的标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).
namestring容器的可选名称。
ENOptional name for the container.
physicalAxesDOM.PhysicalAxes查询容器的可选物理轴。
ENOptional physical axes queried for the container.
logicalAxesDOM.LogicalAxes查询容器的可选逻辑轴。
ENOptional logical axes queried for the container.
queriesScrollStateboolean如果查询包含 scroll-state() 查询,则为 true。
ENtrue if the query contains scroll-state() queries.
queriesAnchoredboolean如果查询包含 anchored() 查询,则为 true。
ENtrue if the query contains anchored() queries.

📌CSS.CSSLayer🧪

CSS Layer at-rule 描述符。

EN
CSS Layer at-rule descriptor.

返回类型:object

属性必填标记类型描述原文
text✔️string图层名称。
ENLayer name.
rangeSourceRange关联规则头在包含样式表中的范围(如果可用)。
ENThe associated rule header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).

📌CSS.CSSLayerData🧪

CSS Layer data.

EN
CSS Layer data.

返回类型:object

属性必填标记类型描述原文
name✔️string图层名称。
ENLayer name.
subLayersarray[CSSLayerData]直接子层
ENDirect sub-layers
order✔️number图层顺序。该顺序决定了图层在层叠顺序中的位置。数值越大,在层叠顺序中的优先级越高。
ENLayer order. The order determines the order of the layer in the cascade order. A higher number has higher priority in the cascade order.

📌CSS.CSSNavigation🧪

CSS导航at规则描述符。

EN
CSS Navigation at-rule descriptor.

返回类型:object

属性必填标记类型描述原文
text✔️string导航规则文本。
ENNavigation rule text.
activeboolean导航条件是否满足。
ENWhether the navigation condition is satisfied.
rangeSourceRange关联规则头部在包含样式表中的范围(如果可用)。
ENThe associated rule header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).

📌CSS.CSSRuleType🧪

枚举类型,用于指示CSS规则的类型,以表示样式规则祖先的顺序。此列表仅包含在祖先规则收集期间收集的规则类型。
允许值:MediaRuleSupportsRuleContainerRuleLayerRuleScopeRuleStyleRuleStartingStyleRuleNavigationRule

EN
Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors. This list only contains rule types that are collected during the ancestor rule collection.
Allowed Values: MediaRule, SupportsRule, ContainerRule, LayerRule, ScopeRule, StyleRule, StartingStyleRule, NavigationRule

返回类型:string


📌CSS.CSSScope🧪

CSS Scope at-rule 描述符。

EN
CSS Scope at-rule descriptor.

返回类型:object

属性必填标记类型描述原文
text✔️string作用域规则文本。
ENScope rule text.
rangeSourceRange关联规则头部在封闭样式表中的范围(如果可用)。
ENThe associated rule header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).

📌CSS.CSSStartingStyle🧪

CSS起始样式规则描述符。

EN
CSS Starting Style at-rule descriptor.

返回类型:object

属性必填标记类型描述原文
rangeSourceRange关联规则头在包含样式表中的范围(如果可用)。
ENThe associated rule header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).

📌CSS.CSSSupports🧪

CSS 支持 at-rule 描述符。

EN
CSS Supports at-rule descriptor.

返回类型:object

属性必填标记类型描述原文
text✔️string支持规则文本。
ENSupports rule text.
active✔️boolean是否满足支持条件。
ENWhether the supports condition is satisfied.
rangeSourceRange关联规则头在封闭样式表中的范围(如果可用)。
ENThe associated rule header range in the enclosing stylesheet (if available).
styleSheetIdDOM.StyleSheetId包含此对象的样式表标识符(如果存在)。
ENIdentifier of the stylesheet containing this object (if exists).

📌CSS.Specificity🧪

Specificity: https://drafts.csswg.org/selectors/#specificity-rules

EN

返回类型:object

属性必填标记类型描述原文
a✔️integera 组件,代表 ID 选择器的数量。
ENThe a component, which represents the number of ID selectors.
b✔️integerb 组件,代表类选择器、属性选择器和伪类的数量。
ENThe b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.
c✔️integerc组件,代表类型选择器和伪元素的数量。
ENThe c component, which represents the number of type selectors and pseudo-elements.