NativeScript / NativeScript/android

Chrome DevTools CSS Domain

Open
#745 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog feature
Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

Implement the CSSAgent, part of the Chrome Debugging Protocol, inside Chrome DevTools.

Features:
  • Preview CSS styles used in application/page
  • Preview computed styles
  • Preview inline styles
Requirements:

ping @vakrilov @hshristov @PanayotCankov

In order to display proper styles information, the CSS agent needs to be sent information following a very specific interface for the selected node in the visual tree.

Selecting an element from the DOM requires the following information to be computed and sent to the inspector:

  • Inline styles -> CSSStyle
  • Style matches -> RuleMatch[]
  • Inherited styles -> InheritedStyleEntry[]
  • (out of the 3.1 scope) Pseudo Element matches -> PseudoElementMatches[]
  • Computed Styles for node -> CSSComputedStyleProperty[]
  • (out of the 3.1 scope) Element Fonts -> PlatformFontUsage

CSSStyle, RuleMatch, InheritedStyleEntry, PseudoElementMatches, CSSComputedStyleProperty, PlatformFontUsage classes' definitions can be previewed at https://github.com/NativeScript/android-runtime/blob/43f9bd0ff7cc96e0560bf5f965ee5f01e19f12d5/test-app/app/src/main/assets/app/css-classes.d.ts#L3

Part of Epic #563

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Chrome Debugging Protocol CSSAgent documentation and the css-classes.d.ts definitions linked in the issue, then inspect the existing computed-style preview and the visual-tree node selection path. The work is done when the remaining in-scope CSSAgent style information is exposed to the inspector, while pseudo-element matches and element fonts remain out of scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, css
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.