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

add css style for code inside markdown #551

Merged
merged 3 commits into from
Oct 14, 2020
Merged

Conversation

Moelf
Copy link
Contributor

@Moelf Moelf commented Oct 9, 2020

No description provided.

@Moelf
Copy link
Contributor Author

Moelf commented Oct 9, 2020

before:
image

after:
image

@Moelf Moelf changed the title add css stype for code inside markdown add css style for code inside markdown Oct 9, 2020
@fonsp
Copy link
Owner

fonsp commented Oct 9, 2020

Can you make it prettier? Experiment with padding, border, rounded corners, an accent color.

It should match the multi-line code block, stylistically.

@Moelf
Copy link
Contributor Author

Moelf commented Oct 9, 2020

before:

after:
before:

I wanted it to match more or less what users usually see in Documentor.jl's HTML style.

frontend/editor.css Outdated Show resolved Hide resolved
@Moelf Moelf requested a review from fonsp October 11, 2020 16:09
@fonsp
Copy link
Owner

fonsp commented Oct 11, 2020

I will reformat this so that we don't need the .markdown selector:

html"""
<p>Hello <code>world</code></p>
"""

should look identical to

md"""
Hello `world`
"""

@fonsp
Copy link
Owner

fonsp commented Oct 11, 2020

I think it's :not(.inline) but i'm not sure

@Moelf
Copy link
Contributor Author

Moelf commented Oct 12, 2020

close, turns out it's .inline_output ;)

@pankgeorg
Copy link
Collaborator

pankgeorg commented Oct 14, 2020

Why is the border-radius so big?
Github seems to use 6px (both <code> and <pre>)
Slack seems to use 3px for <code> and 4px for <pre>
Documenter.jl seems to use 0 with a 0.1empadding and a bigger (.875em vs .75em) font size.
image

@fonsp
Copy link
Owner

fonsp commented Oct 14, 2020

Because it's pretty 🌈

There's no way to discuss these things objectively, but note that we are not trying to match the style of either documenter, slack or github. (Especially not slack, yuck!)

@pankgeorg
Copy link
Collaborator

That is not what I'm suggesting (to match something) -- but I'm pretty sure they've had teams of UX designers that decided against big border-radiuses (same is true for Jupyter btw - 2px).
Even though it is pretty, being pretty is not it's role - I think big/pretty --> distracting, that's why I would suggest a 6px or less for both cases. Up to you, of course.

@Moelf
Copy link
Contributor Author

Moelf commented Oct 14, 2020

while I more or less agree with you, can we just get this merged first so I can at least SEE the code in in-line md?

@fonsp fonsp merged commit 46d33ce into fonsp:master Oct 14, 2020
@fonsp
Copy link
Owner

fonsp commented Oct 17, 2020

As Oscar Wilde put it:

A fashion is merely a form of ugliness so absolutely unbearable that we have to alter it every six months!

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

Successfully merging this pull request may close these issues.

3 participants