Skip to content

Commit

Permalink
fix(Code): align code blocks in lists; closes #398 (#399)
Browse files Browse the repository at this point in the history
* fix(Code): align code blocks in lists; closes #398

* Update packages/gatsby-theme-carbon/src/components/markdown/Markdown.module.scss

Co-Authored-By: Alison Joseph <alisonejoseph@Gmail.com>
  • Loading branch information
boneskull and alisonjoseph committed Sep 25, 2019
1 parent a83da8e commit c92debb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions packages/example/src/pages/components/code-blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ This example overflows to demonstrate the text fading out under the side bar. Th
This example overflows to demonstrate the text fading out under the side bar. This example overflows to demonstrate the text fading out under the side bar.
```

- Code block
- within a list item
```markdown path=/directory/file.mdx src=https://gatsby-theme-carbon.now.sh
### Path and src w/ overflow

This example overflows to demonstrate the text fading out under the side bar. This example overflows to demonstrate the text fading out under the side bar.
This example overflows to demonstrate the text fading out under the side bar. This example overflows to demonstrate the text fading out under the side bar.
```

## Code

````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@

// Fix bleed when code snippets are used in a list
.list-item > pre {
margin-left: -1rem;
margin-right: -1.5rem;
margin-left: 1rem;
margin-top: $spacing-05;
@include carbon--breakpoint('md') {
margin-right: 1.5rem;
margin-right: -$spacing-05;
}
}

Expand Down

0 comments on commit c92debb

Please sign in to comment.