Skip to content

Commit c023e73

Browse files
chore: remove description list vertical margin (#3528)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent e36d894 commit c023e73

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/thirty-dots-reply.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@twilio-paste/description-list": minor
3+
"@twilio-paste/core": minor
4+
---
5+
6+
[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.

packages/paste-core/components/description-list/src/DescriptionList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface DescriptionListProps extends HTMLPasteProps<"dl"> {
1818
const DescriptionList = React.forwardRef<HTMLDListElement, DescriptionListProps>(
1919
({ element = "DESCRIPTION_LIST", children, ...props }, ref) => {
2020
return (
21-
<Box {...safelySpreadBoxProps(props)} as="dl" ref={ref} element={element}>
21+
<Box {...safelySpreadBoxProps(props)} as="dl" marginY="space0" ref={ref} element={element}>
2222
{children}
2323
</Box>
2424
);

packages/paste-core/components/description-list/src/DescriptionListSet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as React from "react";
66

77
export const StyledDescriptionListSet = styled.div(
88
css({
9-
"& > dd:last-of-type": {
9+
":not(:last-of-type)": {
1010
marginBottom: "space60",
1111
},
1212
"& > dd:not(:last-of-type)": {

0 commit comments

Comments
 (0)