Skip to content

Commit

Permalink
IBX-2920: Fixed rolled-up styles (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasOsti authored May 26, 2022
1 parent 39ca3b3 commit 281bc18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
const header = toggler.closest('.ibexa-header');
const headerContainer = header.parentElement;
const tabContent = headerContainer.querySelector('.ibexa-tab-content');
const isTabContentRolledUp = toggler.classList.contains('ibexa-tabs__toggler--rolled-up');

toggler.classList.toggle('ibexa-tabs__toggler--rolled-up');
tabContent.style.height = isTabContentRolledUp ? '' : '0px';
tabContent.classList.toggle('ibexa-tab-content--rolled-up');
};

doc.querySelectorAll('.ibexa-tabs__toggler').forEach((toggler) => {
Expand Down
9 changes: 9 additions & 0 deletions src/bundle/Resources/public/scss/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,13 @@
padding: 0;
}
}

&--rolled-up {
height: calculateRem(24px);
border-radius: 0 0 calculateRem(10px) calculateRem(10px);

.tab-pane {
opacity: 0;
}
}
}

0 comments on commit 281bc18

Please sign in to comment.