-
Notifications
You must be signed in to change notification settings - Fork 762
feat: add description list element styling #6079
feat: add description list element styling #6079
Conversation
96399fa
to
33bfb5e
Compare
Clarity, what about a default gap (md? sm? which do you prefer?) between dt+dd pairs? It seems like a decent thing to have by default, and then |
I think they should be combined, |
|
||
/** @website */ | ||
export function horizontalList() { | ||
return html`<dl cds-list cds-layout="horizontal gap:xl"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing about a horizontal layout is that I would expect it to be like the horizontal layout of forms. Such that the dt
and the dd
would be left and right, instead of stacked on top of one another.
The trick is (as we've seen with forms) setting it such that they all share a common width for the left (key).
Maybe @coryrylan would have some ideas on how this could be accomplished with a custom property or two. Maybe a shared --horizontal-dd-width
that can be set? I'm not sure.
I'm also happy to ditch the horizontal definition list for now too. It's possible that we could add it later if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I spoke with Scott about it the other day on slack, the horizontal was basically extra credit. Not my call, but I don't think it's necessary to support the horizontal layout you describe - also because it would probably break down if someone had more than one dd
or dt
next to each other.
Signed-off-by: Ashley Ryan <asryan@cloudhealthtech.com>
33bfb5e
to
1cbe89a
Compare
@colinreedmiller |
I agree with waiting on horizontal, if it is needed we will hear about it and can address adding it based on requirements - seems like an odd case offhand. Same line for dt and dd is not the sort of thing I'd recommend anyway simply because of usability / harder to scan and read. What I see in vertical with space and layouts is good. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
Adds support for
cds-list
on a dl element, as well as layout styling with dl/dd/dtDoes this PR introduce a breaking change?
Other information
This is still in draft, but I wanted to get some early feedback.
A couple of open questions:
list
files/css?cds-list
?Screenshot: