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

<pre> margin #223

Open
nektro opened this issue Sep 25, 2021 · 4 comments
Open

<pre> margin #223

nektro opened this issue Sep 25, 2021 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@nektro
Copy link

nektro commented Sep 25, 2021

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
Copy link
Owner

EvgenyOrekhov commented Sep 25, 2021

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.

@EvgenyOrekhov EvgenyOrekhov added the question Further information is requested label Sep 25, 2021
@nektro
Copy link
Author

nektro commented Sep 25, 2021

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

@EvgenyOrekhov EvgenyOrekhov added the enhancement New feature or request label Sep 25, 2021
@AntoineFr
Copy link

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
Copy link
Owner

Note to self: I think the margin hacks will not be necessary if #153 gets implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants