-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default styles to the TabPanel component (#20872)
- Loading branch information
1 parent
7eaf250
commit a38de90
Showing
5 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.components-tab-panel__tabs { | ||
display: flex; | ||
align-items: stretch; | ||
} | ||
|
||
.components-tab-panel__tabs-item { | ||
background: transparent; | ||
border: none; | ||
border-radius: 0; | ||
box-shadow: none; | ||
cursor: pointer; | ||
height: 50px; | ||
padding: 3px 15px; // Use padding to offset the is-active border, this benefits Windows High Contrast mode | ||
margin-left: 0; | ||
font-weight: 400; | ||
@include square-style__neutral; | ||
transition: box-shadow 0.1s linear; | ||
|
||
&:focus:enabled { | ||
color: $dark-gray-900; | ||
outline-offset: -1px; | ||
outline: 1px dotted $dark-gray-500; | ||
} | ||
|
||
&:focus:enabled, | ||
&.is-active { | ||
box-shadow: inset 0 -3px theme(outlines); | ||
font-weight: 600; | ||
position: relative; | ||
background: transparent; | ||
|
||
// This border appears in Windows High Contrast mode instead of the box-shadow. | ||
&::before { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
bottom: 1px; | ||
right: 0; | ||
left: 0; | ||
border-bottom: 3px solid transparent; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters