Bug: SVG elements cannot be modified

Open
#20 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
tailwindcss
Domain
devtools, frontend

Research direction

Reproduce the issue with the provided SVG and Tailwind classes while the element is selected in the inspector. Start by examining the communication.js console error and the extension's SVG handling path; done means adding, removing, or changing Tailwind tokens updates the selected SVG as it does for other elements.

Written by the indexing model from the issue text.

Description

With an <svg> selected in the inspector, the extension applies a data-tw-selected attribute to it, but adding/removing/modifying any of the Tailwind tokens in the extension panel does not effect the element.

The below SVG example works as expected when inserted into the document.

<svg class="stroke-cyan-500"></svg>

With that element selected in the inspector, adding an additional token such as rotate-90, or changing the existing token to stroke-green-500 has no effect on the element, which continues to have the class stroke-cyan-500.

The following error message is printed to the console, which may be relevant:

Uncaught (in promise) {message: 'A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received'}
p @ communication.js:1

Adjusting other element types work as expected.

Dominant language
No language data
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from beyondcode/devtoolsfortailwind-community

All issues in beyondcode/devtoolsfortailwind-community

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.