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

feat!: Allow setting a background colour on Tabs List #1142

Merged
merged 13 commits into from
Mar 29, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/css/src/components/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@

@import "../../common/breakpoint";

@mixin reset-button {
background-color: transparent;
border: 0;
}

.ams-tabs__list {
background-color: var(--ams-tabs-list-background-color);
border-bottom: var(--ams-tabs-list-border-bottom);
display: flex;
overflow-x: auto;
}

.ams-tabs__button {
background-color: var(--ams-tabs-button-background-color);
border: var(--ams-tabs-button-border);
color: var(--ams-tabs-button-color);
cursor: var(--ams-tabs-button-cursor);
font-family: var(--ams-tabs-button-font-family);
Expand All @@ -24,6 +28,8 @@
padding-block: var(--ams-tabs-button-padding-block);
padding-inline: var(--ams-tabs-button-padding-inline);

@include reset-button;

&:disabled {
color: var(--ams-tabs-button-disabled-color);
cursor: var(--ams-tab-button-disabled-cursor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"background-color": { "value": "{ams.color.primary-blue}" },
"color": { "value": "{ams.color.primary-white}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"padding-block": { "value": "{ams.space.inside.xs}" },
Expand Down
2 changes: 1 addition & 1 deletion proprietary/tokens/src/components/ams/table.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"table": {
"color": { "value": "{ams.color.primary-black}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"caption": {
"font-weight": { "value": "{ams.text.font-weight.bold}" }
Expand Down
5 changes: 2 additions & 3 deletions proprietary/tokens/src/components/ams/tabs.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"ams": {
"tabs": {
"list": {
"background-color": { "value": "{ams.color.primary-white}" },
"border-bottom": { "value": "{ams.border.width.md} solid {ams.color.primary-blue}" }
},
"button": {
"background-color": { "value": "transparent" },
"border": { "value": "0" },
"color": { "value": "{ams.color.primary-blue}" },
"cursor": { "value": "{ams.action.activate.cursor}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"outline-offset": { "value": "-0.25rem" },
"padding-block": { "value": ".5rem" },
Expand Down
Loading