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

Improve style of code block #368

Closed
koke opened this issue Dec 13, 2018 · 5 comments · Fixed by #1630
Closed

Improve style of code block #368

koke opened this issue Dec 13, 2018 · 5 comments · Fixed by #1630
Assignees
Labels
Milestone

Comments

@koke
Copy link
Member

koke commented Dec 13, 2018

There's not a lot of difference with the paragraph block, except for the monospace font, and some wrong margins:

img_419a975c4e0c-1

The web version for comparison:

img_36271d76b0eb-1

@koke koke added this to the Beta milestone Dec 13, 2018
@iamthomasbishop
Copy link
Contributor

The simplest fix is probably to just apply a different font-family to the code text – although depending on which font we use, we might have to adjust the font-size as well.

If we use Menlo, which IIRC is what we're using on Aztec, it'd look like this at 14pt, same 24pt line-height:

Focused
image

Static
image

The margins should be taken care of by some clean-up of the global styling/margins of the blocks (which I believe @mzorz is working on separately).

@koke koke mentioned this issue Apr 5, 2019
@iamthomasbishop
Copy link
Contributor

I'm coming back to this, and wondering if we should make the styling of the code block (and inline code) more distinct. Something like this:

image

Thoughts, @koke ?

@koke
Copy link
Member Author

koke commented May 17, 2019

It is definitely clearer that it is code than the previous version 😁
I don’t want to take much time with this one, since it’s low priority, but one thing that looks odd to me is the lack of padding inside the background.

@iamthomasbishop
Copy link
Contributor

iamthomasbishop commented May 24, 2019

Good catch. The inline code basically matches Core's padding (2px left/right), but the main Code block should have more padding. I need to update the Sketch library to have 2 variations :)

@iamthomasbishop
Copy link
Contributor

Here are some updated examples, based on the applied paddings (which are the same as the outer block (12 left/right, 16 top/bottom):

image

image

The inline code variation has 2 padding left/right.

image

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

Successfully merging a pull request may close this issue.

4 participants