banthagroup / fslightbox

An easy to use vanilla JavaScript plug-in without production dependencies for displaying images, videos, or, through custom sources, anything you want in a clean overlying box.
MIT License
351 stars 30 forks source link

Let's stop to append fslightbox-styles always [suggestion] #179

Open CodeExplore opened 3 years ago

CodeExplore commented 3 years ago

Hi,

It's a suggestion. As I see styles are appending to head always. If there no assign any item ( nothing has not attribute data-fslightbox ), it should not be append to head.

I mean it styles inject should be here src/index.js#L27 or you know where is best :)