Skip to content

Ability to inspect an element's HTML and CSS using a CSS selector #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Munawwar
Copy link

@Munawwar Munawwar commented May 10, 2025

Gives agents ability to inspect an element's HTML and CSS using a CSS selector. It is useful during local development.

This PR is currently not clean at all, but would you be interested in this feature? If you are interested I can start cleaning up and preparing a better PR.

I built it to let cursor debug some complex css-in -js issues happening in a 3rd party UI library.

cpjet64 referenced this pull request in cpjet64/WebAI-MCP May 25, 2025
- Add inspectElementsBySelector method for CSS selector-based element inspection
- Include computed styles support with configurable properties
- Add Chrome debugging API integration for enhanced element inspection
- Maintain compatibility with existing storage functionality (cookies, localStorage, sessionStorage)
- Resolve merge conflicts between storage and element inspection features
@Munawwar
Copy link
Author

Munawwar commented May 25, 2025

@tedjames any interest in this feature?

My personal use case: I use it from time to time to let AI migrate code (especially the CSS) from material UI to my own UI components. Since MUI's CSS generation + page level and global level CSS overrides is not very obvious via code, letting AI inspect the real elements improves the quality of code it generates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant