Skip to content

Element highlighter#1025

Closed
pwjablonski wants to merge 13 commits intopopcodeorg:masterfrom
pwjablonski:element-highlighter
Closed

Element highlighter#1025
pwjablonski wants to merge 13 commits intopopcodeorg:masterfrom
pwjablonski:element-highlighter

Conversation

@pwjablonski
Copy link
Copy Markdown
Contributor

Hey! This is my first pass. Would love to get feedback if I'm on the right track in approaching this.

This feature detects if the cursor is located in within a CSS block and determines the associated selector. It then sends the selector to the preview window and adds a highlighter div to cover the corresponding elements based on the elements' positions.

screen shot 2017-09-10 at 4 39 29 pm

I used C9 core as a starting point specifically
livecss,js

Couple Points

  • Works for the CSS only
  • Highlight scheme (shadowing/ color) is borrowed from C9. Might want to update.
  • Doesn't include the selector label with the highlight as C9
  • Doesn't display padding margin on elements which would be great to have.
  • Currently, works only if cursor between braces of CSS block

For HTML
This is a lot more tricky and still wrapping my head around it. Quite a few more steps to think through.

  • C9 used an HTML Instrumentor and Simple DOM.

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

2 participants