Skip to content

Commit

Permalink
chore: remove description list vertical margin (#3528)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
nkrantz and kodiakhq[bot] committed Oct 9, 2023
1 parent e36d894 commit c023e73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/thirty-dots-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/description-list": minor
"@twilio-paste/core": minor
---

[Description List] Adjust spacing on Description List component. Description List was previously inheriting 14px of top and bottom margin from the HTML element. This change removes that spacing, so the component now has 0px of top/bottom margin. The same amount of spacing remains between DescriptionListTerms and DescriptionListDetails. In order to maintain designs with Description Lists, you may have to replace the removed spacing to your layout.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface DescriptionListProps extends HTMLPasteProps<"dl"> {
const DescriptionList = React.forwardRef<HTMLDListElement, DescriptionListProps>(
({ element = "DESCRIPTION_LIST", children, ...props }, ref) => {
return (
<Box {...safelySpreadBoxProps(props)} as="dl" ref={ref} element={element}>
<Box {...safelySpreadBoxProps(props)} as="dl" marginY="space0" ref={ref} element={element}>
{children}
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as React from "react";

export const StyledDescriptionListSet = styled.div(
css({
"& > dd:last-of-type": {
":not(:last-of-type)": {
marginBottom: "space60",
},
"& > dd:not(:last-of-type)": {
Expand Down

0 comments on commit c023e73

Please sign in to comment.