Skip to content

Commit

Permalink
feat(tabs): added hover and active styles (carbon-design-system#16523)
Browse files Browse the repository at this point in the history
* feat(tabs): added hover and active styles

* feat(tabs): revert test style

* feat(tabs): active tab style order fix

* feat(tabs): issue fix :last tab is being partially hidden

* feat(tabs): issue fix :last tab is being partially hidden

* feat(tabs): added to contributors list

* feat(tabs): rebase

---------

Co-authored-by: Soumya Raju <[email protected]>
Co-authored-by: Alison Joseph <[email protected]>
  • Loading branch information
3 people authored and annawen1 committed Oct 11, 2024
1 parent fa1548e commit cf0a241
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@
]
},
{
"login": "AliAldobyan",
"login": "AliAldobyan",
"name": "Ali Al Dobyan",
"avatar_url": "https://avatars.githubusercontent.com/u/17975825?v=4",
"profile": "https://github.com/AliAldobyan",
Expand Down Expand Up @@ -1643,6 +1643,15 @@
"contributions": [
"code"
]
},
{
"login": "soumyaraju",
"name": "Soumya Raju",
"avatar_url": "https://avatars.githubusercontent.com/u/41182657?v=4",
"profile": "https://github.com/soumyaraju",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/pamrulla"><img src="https://avatars.githubusercontent.com/u/4942741?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patan Amrulla Khan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=pamrulla" title="Code">💻</a> <a href="https://github.com/carbon-design-system/carbon/commits?author=pamrulla" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Neues"><img src="https://avatars.githubusercontent.com/u/9409245?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Noah Sgorbati</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Neues" title="Code">💻</a> <a href="https://github.com/carbon-design-system/carbon/commits?author=Neues" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/divya-281"><img src="https://avatars.githubusercontent.com/u/72991264?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Divya G</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=divya-281" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/soumyaraju"><img src="https://avatars.githubusercontent.com/u/41182657?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Soumya Raju</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=soumyaraju" title="Code">💻</a></td>
</tr>
</table>

Expand Down
25 changes: 23 additions & 2 deletions packages/styles/scss/components/tabs/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@
&:focus {
@include focus-outline('outline');
}

&:hover {
background-color: $background-hover;
}

&:active {
background-color: $background-active;
}
}

.#{$prefix}--tab--overflow-nav-button--hidden {
Expand All @@ -147,15 +155,28 @@
margin: 0;
background-color: $layer-accent;
inline-size: $spacing-09;

&:hover {
background-color: $layer-accent-hover;
}

&:active {
background-color: $layer-accent-active;
}
}

.#{$prefix}--tab--overflow-nav-button svg {
z-index: 2;
fill: $icon-primary;

&:active,
&:hover {
fill: $icon-primary;
}
}

.#{$prefix}--tab--overflow-nav-button--next {
position: absolute;
position: relative;
inset-block: 0 0;
inset-inline-end: 0;
}
Expand Down Expand Up @@ -187,7 +208,7 @@
}

.#{$prefix}--tab--overflow-nav-button--previous {
position: absolute;
position: relative;
z-index: 1;
inset-block: 0 0;
inset-inline-start: 0;
Expand Down

0 comments on commit cf0a241

Please sign in to comment.