Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Hide duplicate tabs #9570

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Once you have your virtual environment created and activated, you will be able t
<Tabs
groupId="pip-or-conda"
defaultValue='pip'
className="hidden"
values={[
{label: 'pip', value:'pip'},
{label: 'conda', value:'conda'},
Expand Down
4 changes: 4 additions & 0 deletions docs/docusaurus/src/css/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ div[role="tabpanel"]{
font-weight: var(--ifm-font-weight-normal);
line-height: var(--p-line-height);

&.hidden {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to need to add this class to each screen in order to get this effect?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that we'll add the class name to any Tab group that we want to hide the tab selection portion of.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rachel is right, any tab that has the hidden class in the markdown will be hidden!

display: none;
}

& .tabs__item--active {
border-bottom: 0;
font-weight: var(--ifm-font-weight-bold);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Once you have your virtual environment created and activated, you will be able t
<Tabs
groupId="pip-or-conda"
defaultValue='pip'
className="hidden"
values={[
{label: 'pip', value:'pip'},
{label: 'conda', value:'conda'},
Expand Down