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: grid alignment on typography page #2746

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 2 additions & 1 deletion src/components/TypesetStyle/typeset-example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
}

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

@include carbon--breakpoint('md') {
padding: $spacing-05 $spacing-06;
width: 33.3%;
border-left: 1px solid $carbon--gray-20;
}
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