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

Suggestion: Change <div> in <dl> content rules for styling purposes #7347

Closed
mincerafter42 opened this issue Nov 19, 2021 · 6 comments
Closed

Comments

@mincerafter42
Copy link

mincerafter42 commented Nov 19, 2021

Currently, I think the rules for <div>s in <dl>s are not sufficient for all styling purposes. Rationale for accommodating styling here is in #1937.

Sorry if my use case is too specific; I can't think of a way to generalize it: I am using CSS flexboxes to style a dl such that the information is styled as a row, with some columns containing only one group of dts followed by dds, and some columns containing multiple groups of dts followed by dds. This is for purely visual purposes and does not reflect any semantic separation between the terms; they are all part of the same list.

Possible solutions:

  • Allow multiple groups of dts followed by dds in divs in dls:
    <dl>
     <div>
      <dt>term</dt>
      <dd>description</dd>
      <dt>term 2</dt>
      <dd>description 2</dd>
     </div>
     <div>
      <dt>term 3</dt>
      <dd>description 3</dd>
     </div>
     </dl>
  • Allow nesting of divs in dls:
    <dl>
     <div>
      <div>
       <dt>term</dt>
       <dd>description</dd>
      </div>
      <div>
       <dt>term 2</dt>
       <dd>description 2</dd>
      </div>
     </div>
     <div>
      <dt>term 3</dt>
      <dd>description 3</dd>
     </div>
    </dl>
@domenic
Copy link
Member

domenic commented Nov 19, 2021

This makes sense to me. I'd love @zcorpan's perspective.

@zcorpan
Copy link
Member

zcorpan commented Nov 22, 2021

I'm not sure about further "relaxing" the content model for dl to support styling needs. #1937 had pushback from a WYSIWYG editor developer, and this change seems like it would make it worse again.

#1937 (comment)

@annevk
Copy link
Member

annevk commented Nov 23, 2021

(In particular, it had pushback from a WYSIWYG editor developer (not editors of the HTML standard).)

@zcorpan
Copy link
Member

zcorpan commented Nov 23, 2021

(Clarified my comment)

@CBID2
Copy link

CBID2 commented Sep 2, 2023

Hey @annevk. Just in case you need clarification from my reply on Element , I want to do this one.

@annevk
Copy link
Member

annevk commented Sep 18, 2023

Given that we never got follow-up on @zcorpan's explanation I don't think anything else is needed here. We'll leave this as-is.

@annevk annevk closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants