Semantic-ui: [Accordion] Its `.content` and `.title` classes shouldn鈥檛 override the corresponding classes of nested components.

Created on 20 Jan 2017  路  8Comments  路  Source: Semantic-Org/Semantic-UI

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/

Enhancement

Most helpful comment

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

All 8 comments

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"/>).

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

@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 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?

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

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

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.

I've recently encountered this by using the 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

guilhermeblanco picture guilhermeblanco  路  3Comments

larsbo picture larsbo  路  3Comments

rdzidziguri picture rdzidziguri  路  3Comments

davialexandre picture davialexandre  路  3Comments