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

Request: Remove hard-coded margins, padding #23

Open
tobydriscoll opened this issue Feb 15, 2019 · 1 comment
Open

Request: Remove hard-coded margins, padding #23

tobydriscoll opened this issue Feb 15, 2019 · 1 comment

Comments

@tobydriscoll
Copy link

It looks as though Format.jl sets the CSS border, margins, and padding of a pre.hljl selector using hard-coded values. In my testing, a theme cannot override these settings. This complicates downstream usage. Most saliently, the caller cannot set them in the pre selector for itself and have those values respected across a variety of containers. (See JunoLab/Weave.jl#172 (comment).)

Options would be to remove these values from the pre.hljl selector in Format.jl, or make the values changeable via the theme.

@mortenpi
Copy link
Member

mortenpi commented Aug 8, 2019

I agree that hard-coded values in the CSS are not ideal. If nothing else, we could make it configurable, so that you can override the values or have a way of opting out of creating the pre.hljl block here:

function render(io::IO, mime::MIME"text/css", theme::Theme)
print(io,
"""
pre.hljl {
border: 1px solid #ccc;
margin: 5px;
padding: 5px;
overflow-x: auto;
"""
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants