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

fix(Code): align code blocks in lists; closes #398 #399

Merged
merged 4 commits into from
Sep 25, 2019

Conversation

boneskull
Copy link
Contributor

@boneskull boneskull commented Sep 4, 2019

This "works" but may not be "correct", as I'm unclear about the intention of the margins with this thing. Responsiveness seems OK.

closes #398

@vercel
Copy link

vercel bot commented Sep 4, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://gatsby-theme-carbon-git-fork-boneskull-code-in-list.carbon-design-system.now.sh

@alisonjoseph
Copy link
Member

Going to defer to design on this question, as I believe the intent is for the code blocks to bleed into the gutter on the left edge. However, not sure about when in a list. @jeanservaas

https://gatsby-theme-carbon-git-fork-boneskull-code-in-list.carbon-design-system.now.sh/components/code-blocks

Screen Shot 2019-09-05 at 7 06 02 AM

@boneskull
Copy link
Contributor Author

I’m not a designer, but I’d expect the left-alignment to be consistent within a list (like gfm rendering).

@alisonjoseph alisonjoseph requested a review from a team September 6, 2019 19:14
@ghost ghost removed their request for review September 6, 2019 19:14
@alisonjoseph
Copy link
Member

@jeanservaas any feedback on this? (how code blocks should align when within a list)

@vpicone
Copy link
Contributor

vpicone commented Sep 12, 2019

@carbon-design-system/design would like some input on how code should be rendered in lists.

@vpicone vpicone requested a review from a team September 12, 2019 17:03
@ghost ghost removed their request for review September 12, 2019 17:03
@vpicone vpicone requested review from a team and removed request for jeanservaas September 12, 2019 17:10
@ghost ghost requested review from designertyler and removed request for a team September 12, 2019 17:10
@jeanservaas
Copy link
Contributor

Normally I would say don't nest code snippets inside of a list -- use a header instead so that you don't have to deal with indentation or use inline code snippets.

However, if this is a very common pattern in docs and absolutely must be indented, design doesn't have time to look at this, I'd say dealing with it like this will be OK.

image

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design is ok w/ left alignment. I'd suggest we update so that it right aligns at 8 columns?

Screen Shot 2019-09-12 at 5 50 20 PM

@boneskull
Copy link
Contributor Author

@alisonjoseph Sorry, I don't understand; are you asking me for a fix? I will need some hand-holding if I'm to change the right margin. I originally tried to change this myself, and couldn't figure it out.

@alisonjoseph
Copy link
Member

I'll try and take a look tomorrow and see what we need to do to fix the margins here. 👍

…module.scss

Co-Authored-By: Alison Joseph <alisonejoseph@Gmail.com>
@boneskull
Copy link
Contributor Author

@alisonjoseph hmm, not quite...

image

@alisonjoseph
Copy link
Member

I think that’s a bug with the code snippet being slightly off grid. I can open a separate PR to fix that.

@boneskull
Copy link
Contributor Author

I’ll take your word for it! LGTM then, fwiw.

Copy link

@designertyler designertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@vercel vercel bot temporarily deployed to staging September 24, 2019 23:25 Inactive
@alisonjoseph alisonjoseph merged commit c92debb into carbon-design-system:master Sep 25, 2019
@boneskull
Copy link
Contributor Author

@alisonjoseph thanks!

@boneskull boneskull deleted the code-in-list branch September 25, 2019 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fenced code block within list misaligned
5 participants