Skip to content
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

Add element breadcrumbs for style tags and inline styles #35

Open
bartveneman opened this issue Jun 9, 2020 · 1 comment
Open

Add element breadcrumbs for style tags and inline styles #35

bartveneman opened this issue Jun 9, 2020 · 1 comment
Labels
✨ enhancement New feature or request

Comments

@bartveneman
Copy link
Member

Report where in the DOM the <style> and <x style="..."> were found. This breadcrumb could be generated by looking at the target DOM node, and traverse up the (while (node.parentNode)) and generating the selector for that node by taking the nodeName, className and ID.

[
  {
    href: undefined,
    breadcrumb: ['html', 'body', 'thing', 'p'],
    type: 'inline'
    css: '[x-inline-style] { color: red; }'
  },
  {
    href: undefined,
    breadcrumb: ['html', 'head', 'style'],
    type: 'style',
    css: 'p { }'
  }
]
@bartveneman bartveneman added the ✨ enhancement New feature or request label Jun 9, 2020
@bartveneman
Copy link
Member Author

Example breadcrumb implementation: https://codepen.io/bartveneman/pen/GRoooxa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Development

No branches or pull requests

1 participant