EvgenyOrekhov / holiday.css

A minimalist classless CSS theme with dark mode support. Only 5 KB.
https://holidaycss.js.org
MIT License
135 stars 9 forks source link

<pre> margin #223

Open nektro opened 3 years ago

nektro commented 3 years ago

https://github.com/EvgenyOrekhov/holiday.css/blob/master/dist/holiday.css#L368-L372

can you elaborate on what "Prism hack" refers to? the margin here being !important makes it much more difficult to override

EvgenyOrekhov commented 3 years ago

Prism uses 0.5em margins, and it doesn't look quite right with holiday.css. I had to make them 1rem. I also have a few other !important overrides for Prism and highlight.js. I hate !important, but I couldn't figure out how to avoid it.

nektro commented 3 years ago

using the same selector they use pre[class*="language-"] should work so long as holiday is loaded after

https://github.com/PrismJS/prism/blob/master/themes/prism.css#L51-L55

AntoineFr commented 1 year ago

Hello @EvgenyOrekhov, I also encountered an issue related to this CSS hack for Prism when using holiday with EasyMDE. It breaks because of the extra margins.

Here is a demo link (try to edit Second paragraph) : https://codepen.io/eniotna/pen/qBLdWxe

EvgenyOrekhov commented 1 year ago

Note to self: I think the margin hacks will not be necessary if https://github.com/EvgenyOrekhov/holiday.css/issues/153 gets implemented.