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 data-content='item' attribute to the generated span tags. #26

Closed
wants to merge 3 commits into from
Closed

Conversation

briandmcnabb
Copy link

Add data-content='item' attribute to the generated span tags.

This hook allows for dynamic use of :before and :after pseudo elements to layer text by way of a attr() call.

span.char1:before {
  content: attr(data-content);
  ... 
}

No more hard coding textual content in css files!

…ok for styling with :before and :after pseudo elements, e.g.

  span.char1:before {
    content: attr(data-content);
    ... 
  }
@davatron5000
Copy link
Owner

Cool idea. One thought... for a .word or .line use you could potentially close the attribute with a " character and that'd be problematic. Thoughts?

@briandmcnabb
Copy link
Author

Sorry it took so long to address this... got busy. Didn't want you to think I flaked. Either way, the commit above should take care of escaping any " characters.

@davatron5000
Copy link
Owner

Going to merge this into #45. Thanks for your original commits @briandmcnabb. Appreciate it.

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