Skip to content

Commit

Permalink
fix: grid alignment on typography page (#2746)
Browse files Browse the repository at this point in the history
* fix: grid alignment on typography page

* fix: update padding
  • Loading branch information
alisonjoseph authored Feb 22, 2022
1 parent 798882f commit c9b26f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 7 additions & 6 deletions src/components/TypesetStyle/TypesetExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ const TypesetExample = (props) => (
)
);

const currentBreakpointPx = values(breakpoints)[
indexOfClosestLargerBreakpoint
];
const currentBreakpointPx =
values(breakpoints)[indexOfClosestLargerBreakpoint];

const currentBreakpointName = findKey(
breakpoints,
Expand All @@ -48,7 +47,9 @@ const TypesetExample = (props) => (
typeStylesUntilCurrentBreakpoint.push(
props.typeScale[type.key][item]
);
if (item === breakpointName) {break;}
if (item === breakpointName) {
break;
}
}
return Object.assign(
{},
Expand Down Expand Up @@ -129,13 +130,13 @@ const TypesetExample = (props) => (
className={`${prefix}--typeset-example`}>
<div className={`${prefix}--typeset-example-row ${prefix}--row`}>
<div
className={`${prefix}--typeset-example-description ${prefix}--col-md-5`}>
className={`${prefix}--typeset-example-description ${prefix}--col-md-6`}>
<p className={versionClassNames} style={specs}>
{type.description}
</p>
</div>
<div
className={`${prefix}--typeset-example-specs ${prefix}--col-md-3 ${prefix}--padding`}>
className={`${prefix}--typeset-example-specs ${prefix}--col-md-2 ${prefix}--padding`}>
<span className={`${prefix}--type-body-short-01`}>
<span className={`${prefix}--type-semibold`}>{type.name} </span>
<br />
Expand Down
2 changes: 1 addition & 1 deletion src/components/TypesetStyle/typeset-example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

.bx--typeset-example-specs {
padding: $spacing-05 $spacing-06;
padding: $spacing-05;

@include carbon--breakpoint('md') {
width: 33.3%;
Expand Down
2 changes: 0 additions & 2 deletions src/components/TypesetStyle/typeset-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ $prefix: 'bx';

@include carbon--breakpoint('lg') {
margin-top: 0;
left: 0.5rem;
margin-right: $spacing-03;
}
}

Expand Down

1 comment on commit c9b26f9

@vercel
Copy link

@vercel vercel bot commented on c9b26f9 Feb 22, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.