Skip to content

Commit

Permalink
fix: Adjust header margins and list styles
Browse files Browse the repository at this point in the history
closes #119
  • Loading branch information
vpicone committed May 29, 2019
1 parent 67da7c0 commit 40012b8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
6 changes: 3 additions & 3 deletions packages/gatsby-theme-carbon/src/components/markdown/H4.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import responsiveStyles from '../shared/responsiveStyles';

const h4Css = ({ typeStyles, layout }) => [
const h4Css = ({ typeStyles, spacing }) => [
typeStyles.heading02,
responsiveStyles,
{
marginTop: layout[0],
marginBottom: `calc(0.5 * ${layout[0]})`,
marginTop: spacing[4],
lineHeight: 1.5,
},
];

Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby-theme-carbon/src/components/markdown/H5.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import responsiveStyles from '../shared/responsiveStyles';

const h5Css = ({ typeStyles, layout }) => [
const h5Css = ({ typeStyles, spacing }) => [
typeStyles.heading01,
responsiveStyles,
{
marginTop: layout[0],
marginBottom: `calc(0.5 * ${layout[0]})`,
marginTop: spacing[4],
lineHeight: 1.5,
},
];

Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby-theme-carbon/src/components/markdown/H6.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import responsiveStyles from '../shared/responsiveStyles';

const h5Css = ({ typeStyles, layout }) => [
const h5Css = ({ typeStyles, spacing }) => [
typeStyles.heading01,
responsiveStyles,
{
marginTop: layout[0],
marginBottom: `calc(0.5 * ${layout[0]})`,
marginTop: spacing[4],
lineHeight: 1.5,
},
];

Expand Down
8 changes: 2 additions & 6 deletions packages/gatsby-theme-carbon/src/components/markdown/Ol.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,19 @@ const List = styled.ol`
margin-bottom: 1.5rem;
li {
margin-left: 1rem;
margin-left: 1.25rem;
counter-increment: step-counter;
a {
color: ${({ theme }) => theme.colors.black};
}
& :before {
content: counter(step-counter) '. ';
position: absolute;
margin-left: -0.5rem;
transform: translate(-100%, 0px);
margin-left: -1.25rem;
}
& p {
display: inline;
}
${mq.md} {
margin-left: 2rem;
}
}
`;

Expand Down
8 changes: 2 additions & 6 deletions packages/gatsby-theme-carbon/src/components/markdown/Ul.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ const List = styled.ul`
margin-bottom: 1.5rem;
li {
margin-left: 1rem;
margin-left: 1.25rem;
a {
color: ${props => props.theme.colors.white};
}
& :before {
content: '–';
position: absolute;
margin-left: -0.5rem;
transform: translate(-100%, 0px);
margin-left: -1.25rem;
}
& p {
display: inline;
}
${mq.md} {
margin-left: 2rem;
}
}
`;

Expand Down

0 comments on commit 40012b8

Please sign in to comment.