Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

[Accordion] Its `.content` and `.title` classes shouldn’t override the corresponding classes of nested components.

Open dmaison opened this issue 7 years ago • 9 comments

Steps to Reproduce

  1. Create accordion
  2. Add header inside accordion

Expected The header should be formatted correctly

Result The inherent accordion style interferes with the formatting of the header

Testcase http://jsfiddle.net/p9L4c6Lh/1/

dmaison avatar Jan 20 '17 17:01 dmaison

Hello. But why do you use <div class="content"/> inside <h2 class="ui dividing header"/>? It works perfectly without this extra-container (it's because content class has a special purpose inside <div class="ui accordion"/>).

Darkesthour avatar Jan 23 '17 10:01 Darkesthour

to sum up @Darkesthour explanation.. remove the div.content sitting inside the dividing header.

BitForger avatar Jan 23 '17 14:01 BitForger

@Cyb3rWarri0r8 @Darkesthour, this solution doesn't account for adding sub headers, or even any other type of semantic style group that can utilize a content class.

The way I see it, specific styles shouldn't conflict with other styles in semantic. Changing the style for accordion content from .ui.accordion .content to .ui.accordion > .content would prevent any foreseeable conflicting issues.

dmaison avatar Jan 23 '17 14:01 dmaison

@dmaison Well there is the ability to override that if you want to... I haven't tried this, but for things that say to have a div.content have you tried just using it without the content wrapper?

BitForger avatar Jan 23 '17 14:01 BitForger

One more appropriate testcase, this time with Floated List: http://jsfiddle.net/fseb296h/

And in my case I can't just remove "content" class, because I'm using Semantic-UI-React. I also think, that .ui.accordion > .content will be just fine

Unsfer avatar Apr 05 '17 07:04 Unsfer

The search component seems to be affected as well: #5330.

awgv avatar May 03 '17 20:05 awgv

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 23 '18 12:02 stale[bot]

I've recently encountered this by using the <Message.List /> component within a stylized accordion in Semantic-Ui-React.

The suggested .ui.accordion > .content referenced by @dmaison was able to resolve my issue, however, it still seems inappropriate for the accordion content to clash with other components as a default behavior.

attaboyer-dev avatar Nov 05 '18 19:11 attaboyer-dev

Fixed in the community fork Fomantic-UI by https://github.com/fomantic/Fomantic-UI/pull/2197 See your adjusted jsfiddle here https://jsfiddle.net/lubber/gvmwj4na/2/

lubber-de avatar Jan 07 '22 13:01 lubber-de