Skip to content

Set <summary> elements to display:list-item #604

Closed

Description

@Mottie

Activity

  1. silverwind commented on Jul 2, 2016

    @silverwind

    I think this is more of an GitHub bug than anything, they explicitely set summary {display:block} which causes the incorrect rendering on Firefox.

  2. Mottie commented on Jul 2, 2016

    @Mottie
    Author

    If you look at GitHub's current css source, they are using:

    /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
  3. silverwind commented on Jul 3, 2016

    @silverwind

    Ah, didn't realize that display: block is happening in normalize.css, so it's a valid issue indeed!

  4. jonathantneal commented on Jul 3, 2016

    @jonathantneal
    Contributor

    Thanks for letting me know, and also for the link in the spec. I’ll take care of this as soon as I can validate this in a test. Looks like the new display property will work just fine per https://developer.mozilla.org/en-US/docs/Web/CSS/display#compat-desktop (but again, testing to be sure)

  5. Mottie commented on Jul 6, 2016

    @Mottie
    Author

    Odd... the internal Firefox stylesheet (v47.0.1; resource://gre-resources/html.css) sets summary with a display:block initially. But if it is wrapped inside a <details> element, this definition applies:

    details > summary::-moz-list-bullet {
      list-style-type: disclosure-closed;
      /* Prevent elements in summary being selected when clicking on the triangle. */
      -moz-user-select: none;
    }
    
    details[open] > summary::-moz-list-bullet {
      list-style-type: disclosure-open;
    }

    So I think the tests need to be updated.

  6. silverwind commented on Jul 6, 2016

    @silverwind

    The UA sheet looks alright for me in Firefox 49. The pref was flipped on in 49, resulting in display:list-item for details > summary, and display:block for standalone summary, presumably for compatibilty reasons.

    summary {
      display: block;
    }
    
    @supports -moz-bool-pref("dom.details_element.enabled") {
      details > summary:first-of-type,
      details > summary:-moz-native-anonymous {
        display: list-item;
      }
    }
  7. aethanyc commented on Jul 7, 2016

    @aethanyc

    <details> and <summary> will ship in Firefox 49 so the stylesheet before this version is outdated.

  8. Mottie commented on Sep 21, 2016

    @Mottie
    Author

    Firefox v49 went live yesterday!

    Click me

    Did you see an arrow indicator in GitHub?!

    Update: Request to GitHub to update to normalize.css v4.2.0 was sent!

  9. jonathantneal commented on Oct 3, 2016

    @jonathantneal
    Contributor

    This is also live in v5.0.0 which has been tagged and published to npm as normalize.css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions