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

Expand arrow gone from summary element #21060

Closed
vanillajonathan opened this issue Nov 1, 2016 · 5 comments
Closed

Expand arrow gone from summary element #21060

vanillajonathan opened this issue Nov 1, 2016 · 5 comments

Comments

@vanillajonathan
Copy link
Contributor

The visual expand arrow visible in Chrome and Firefox on the details element disappears with normalize.

I don't know if this is intentional or not.

<details>
  <summary>Click on this summary to expand</summary>
  <p>Here is additional text, visible when expanded...</p>
</details> 

Bootstrap 3.3.7
https://jsfiddle.net/vu6o29es/

Cross-reference: necolas/normalize.css#640

@patrickhlauke
Copy link
Member

I can't reproduce in Chrome 54/Windows 10, but do see the problem in Firefox 49. This seems to be a browser bug, rather than anything intentional.

@thierryk
Copy link

thierryk commented Nov 1, 2016

The problem is not with details but with summary. This is because the browser styles summary using:

details > summary:first-of-type {
   display: list-item;
}

so this rule

article, 
aside, 
details, 
figcaption, 
figure, 
footer, 
header, 
hgroup, 
main, 
menu, 
nav, 
section, 
summary { 
  display: block;
}

overwrites the style for summary.

@thierryk
Copy link

thierryk commented Nov 1, 2016

As a side note, I think the title of this issue should be changed to:

Expand arrow gone from summary element

@thierryk
Copy link

thierryk commented Nov 1, 2016

I forgot to mention that display: list-item is the correct normalization for this element, see
https://github.com/necolas/normalize.css/blob/master/normalize.css#L430

/*
 * Add the correct display in all browsers.
 */

summary {
  display: list-item;
}

@vanillajonathan vanillajonathan changed the title Expand arrow gone from details element Expand arrow gone from summary element Nov 1, 2016
@vanillajonathan
Copy link
Contributor Author

Seems according to @awayken a solution would be to update to Normalize 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants