-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
featureNew Feature RequestNew Feature Request
Description
Status Quo
It would be desirable to improve the way CSS for the tooltip is used with this plugin. Currently the user have to copy the CSS file and include it themselves in the page. I'm creating this issue here to maybe get some input from other's on how we could do this.
Pros:
- Users can easily override and completely restyle the tooltip
- Users can integrate the CSS with whatever solution they have like a global main.css with minification, or SASS setup.
Cons:
- More work to set up the plugin
- More work to keep the plugin up-to-date when new versions (of the CSS file) is committed to the plugin
Desired state
- By default, CSS is included in the generated pages with no additional steps needed by the user, other than enabling the plugin and using the glossary tag
- Still allowing the user to completely restyle the CSS (replace or override)
Solution ideas
- Could inline all CSS styling. The con is that the page size grows as styling is not reused.
- Could be possible to use a post-render (or pre?) hook to insert the style sheet rel tag in HEAD like jekyll-target-blank. The CSS rel tag could be included only if a glossary tag is actually used on the page.
- To get the CSS file itself, a simple generator plugin can be used. The generator skip creating the CSS if the user already has one in the source tree (enable CSS override)
- Could copy a CSS file on each tag invocation (https://gist.github.com/salex/480380#file-jekyll_uv_highlight-rb-L68-L74)
and add inline css include for each one (https://gist.github.com/salex/480380#file-jekyll_uv_highlight-rb-L60)
badosu
Metadata
Metadata
Assignees
Labels
featureNew Feature RequestNew Feature Request