dobarkod / cookie-banner

JavaScript based cookie-info banner for complying with EU cookie law
MIT License
425 stars 85 forks source link

Make sure font size of moreinfo link is same as message #49

Closed webaddicto closed 7 years ago

webaddicto commented 7 years ago

el_a.style.fontSize = this.options.fontSize;

I implemented cookie-banner on a website and noticed the font size of the "more info" link was bigger than the message (due to website CSS style), so adding this change should make sure the font size of the "more info" link is same as the font size specified in the options.

zytzagoo commented 7 years ago

Could this be considered a BC breaking change depending on how existing sites implemented it already? The idea was generally that the visuals are controlled by the site's CSS if I remember correctly...

I mean, if the site's CSS says what's the default font-size for certain things, we shouldn't interfere with that? Meaning, if anyone were to update the script to a newer version with this change in it, the cookie notice might now be slightly different visually than it was previously (inline style etc.)? (Or am I missing something?)

OTOH, in cases where a developer has no way to change/influence the site's css (and the css is such that it causes the issue you describe yourself), this change might be useful and allow him to "fix" the problem...

Can we do it in a way that can guarantee no BC breaks? (Seems to me it's a tough nut to crack currently, but I'm really tired so might not be thinking through all the possibilities)

senko commented 7 years ago

I think it’d be consistent if we add another option for this, analogous to other moreinfo* options. This way we’d be sure not to break backwards compatibility while still allowing full styling without requiring CSS changes.