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 support for Prism.js toolbar plugin #14

Open
tempris opened this issue Jan 26, 2021 · 0 comments
Open

Add support for Prism.js toolbar plugin #14

tempris opened this issue Jan 26, 2021 · 0 comments

Comments

@tempris
Copy link

tempris commented Jan 26, 2021

I have found that simply adding the following will enable the toolbar plugin for Prism.js to work with Prism-Live.js:

/* Add support for prism toolbar. */

div.prism-live:hover .toolbar {
  opacity: 1;
}

div.prism-live .toolbar, 
.code-toolbar .toolbar /* Added because <pre> initiated variant has different structure than normal */
{
  z-index: 2;
}

I have added it as prism-live-toolbar.css to a branch on my own fork but is small so I am not sure if it justifies it being in its own file, unless it is better for people to be able to choose whether or not they want to include it into their own projects.

If you have time please let me know if this is acceptable for a merge request. Also should it be in a separate css file or in the main one?

Thanks for your time! #

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

No branches or pull requests

1 participant