Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.12k stars 4.94k forks source link

[Accordion] Content children display rules are overridden #6459

Closed GammaGames closed 6 years ago

GammaGames commented 6 years ago

Steps

  1. Give child of accordion content css for display: none
  2. Child is shown when accordion item is open and closed

Expected Result

Item CSS shouldn't be overridden

Actual Result

Item CSS is overridden

Version

2.3.2

Testcase

Open and close the top item

ColinFrick commented 6 years ago

You could deactivate the animateChildren option:

$(".ui.accordion").accordion({animateChildren: false});

Or wrap the content in a div:

<div class="active content">
  <div>
    <p class="hidden">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
    <a class="hidden ui right floated blue labeled icon button">
      <i class="circle icon"></i>
      Hidden?
    </a>
  </div>
</div>
GammaGames commented 6 years ago

The animateChildren option was exactly what I was looking for, somehow I missed it! Thank you!