Skip to content

Commit

Permalink
fix(accordion): Invert active condition
Browse files Browse the repository at this point in the history
Instead of setting the default display to 'none' and active display to 'block', we only set the the display to 'none' when it's `:not(.active)`

Was reported in Semantic-Org/Semantic-UI#6351
  • Loading branch information
ColinFrick committed Aug 14, 2018
1 parent a0af175 commit 1dea0bf
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/definitions/modules/accordion.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@
color: @titleColor;
}

/* Content */
.ui.accordion .title ~ .content,
.ui.accordion .accordion .title ~ .content {
display: none;
}

/* Default Styling */
.ui.accordion:not(.styled) .title ~ .content:not(.ui),
.ui.accordion:not(.styled) .accordion .title ~ .content:not(.ui) {
Expand Down Expand Up @@ -186,12 +180,12 @@
*******************************/

/*--------------
Active
Not Active
---------------*/

.ui.accordion .active.content,
.ui.accordion .accordion .active.content {
display: block;
.ui.accordion .content:not(.active),
.ui.accordion .accordion .content:not(.active) {
display: none;
}

/*******************************
Expand Down

0 comments on commit 1dea0bf

Please sign in to comment.