Skip to content
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
63 changes: 44 additions & 19 deletions sass/themes/components/tabs/_tabs-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
/// @param {Color} $item-hover-color [null] - The text color used for the tabs on hover.
/// @param {Color} $item-icon-color [null] - The color used for the tab icon.
/// @param {Color} $item-active-icon-color [null] - The color used for the active tab icon.
/// @param {Color} $item-active-hover-icon-color [null] - The color used for the active tab icon on hover and focus.
/// @param {Color} $item-hover-icon-color [null] - The color used for the tab icon on hover.
/// @param {Color} $item-disabled-icon-color [null] - The color used for the disabled tab icon.
/// @param {Color} $item-active-color [null] - The color used for the active tabs text.
/// @param {Color} $item-active-background [null] - The color used for the active/focused tab background.
/// @param {Color} $item-active-hover-color [null] - The color used for the active tabs text on hover and focus.
/// @param {Color} $item-active-background [null] - The color used for the active tab background.
/// @param {Color} $item-active-hover-background [null] - The color used for the active tab background on hover and focus.
/// @param {Color} $item-disabled-color [null] - The color used for the disabled tabs text.
/// @param {Color} $indicator-color [null] - The color used for the active tab indicator.
/// @param {Color} $button-color [null] - The color used for the button icon/text color.
Expand Down Expand Up @@ -51,10 +54,13 @@
$item-hover-color: null,
$item-icon-color: null,
$item-active-icon-color: null,
$item-active-hover-icon-color: null,
$item-hover-icon-color: null,
$item-disabled-icon-color: null,
$item-active-color: null,
$item-active-hover-color: null,
$item-active-background: null,
$item-active-hover-background: null,
$item-disabled-color: null,
$indicator-color: null,
$button-color: null,
Expand Down Expand Up @@ -82,7 +88,11 @@
$variant: map.get($theme, '_meta', 'theme');

@if not($item-active-background) and $item-background {
$item-active-background: dynamic-shade(var(--item-background));
$item-active-background: var(--item-background);
}

@if not($item-active-hover-background) and $item-active-background {
$item-active-hover-background: dynamic-shade(var(--item-active-background));
}

@if not($item-background) {
Expand All @@ -103,8 +113,24 @@
}
}

@if not($item-active-icon-color) and $item-active-color {
$item-active-icon-color: var(--item-active-color);
}

@if not($item-active-color) and $item-active-icon-color {
$item-active-color: var(--item-active-icon-color);
}

@if not($item-active-hover-color) and $item-active-color {
$item-active-hover-color: var(--item-active-color);
}

@if not($item-active-hover-icon-color) and $item-active-icon-color {
$item-active-hover-icon-color: var(--item-active-icon-color);
}

@if not($item-active-background) {
@if $variant != 'bootstrap' {
@if $variant != 'bootstrap' and $variant != 'material' {
@if not($item-active-icon-color) and $item-icon-color {
$item-active-icon-color: var(--item-icon-color);
}
Expand All @@ -114,21 +140,21 @@
}
}
} @else {
@if not($item-active-icon-color) and $item-active-color {
$item-active-icon-color: var(--item-active-color);
}

@if not($item-active-color) and $item-active-icon-color {
$item-active-color: var(--item-active-icon-color);
}

@if not($item-active-icon-color) and $item-active-background {
$item-active-icon-color: adaptive-contrast(var(--item-active-background));
}

@if not($item-active-color) and $item-active-background {
$item-active-color: adaptive-contrast(var(--item-active-background));
}

@if not($item-active-hover-icon-color) and $item-active-hover-background {
$item-active-hover-icon-color: adaptive-contrast(var(--item-active-hover-background));
}

@if not($item-active-hover-color) and $item-active-hover-background {
$item-active-hover-color: adaptive-contrast(var(--item-active-hover-background));
}
}

@if not($item-hover-background) {
Expand Down Expand Up @@ -162,21 +188,17 @@
$border-color--hover: var(--border-color);
}
} @else {
@if not($item-background) {
@if not($indicator-color) and $item-text-color {
$indicator-color: var(--item-text-color);
}

@if not($indicator-color) and $item-icon-color {
$indicator-color: var(--item-icon-color);
@if not($item-active-background) {
@if not($indicator-color) and $item-active-color {
$indicator-color: var(--item-active-color);
}
} @else {
@if not($indicator-color) and $item-active-color {
$indicator-color: var(--item-active-color);
}

@if not($indicator-color) {
$indicator-color: adaptive-contrast(var(--item-background));
$indicator-color: adaptive-contrast(var(--item-active-background));
}
}
}
Expand Down Expand Up @@ -249,10 +271,13 @@
item-hover-background: $item-hover-background,
item-icon-color: $item-icon-color,
item-active-icon-color: $item-active-icon-color,
item-active-hover-icon-color: $item-active-hover-icon-color,
item-hover-icon-color: $item-hover-icon-color,
item-disabled-icon-color: $item-disabled-icon-color,
item-active-color: $item-active-color,
item-active-hover-color: $item-active-hover-color,
item-active-background: $item-active-background,
item-active-hover-background: $item-active-hover-background,
item-disabled-color: $item-disabled-color,
indicator-color: $indicator-color,
button-color: $button-color,
Expand Down
35 changes: 29 additions & 6 deletions sass/themes/schemas/components/dark/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// Generates a base dark tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-background [color: ('gray', 100, .5)] - The background used for the tabs on hover.
/// @prop {Map} item-active-background [color: ('gray', 100, .5)] - The color used for the active/focused tab background.
/// @prop {Map} item-active-hover-background [color: ('gray', 100, .5)] - The color used for the active tab background on hover and focus.
$base-dark-tabs: (
item-hover-background: (
color: (
Expand All @@ -22,7 +22,7 @@ $base-dark-tabs: (
0.5,
),
),
item-active-background: (
item-active-hover-background: (
color: (
'gray',
100,
Expand All @@ -34,7 +34,7 @@ $base-dark-tabs: (
/// Generates a dark material tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-background [color: ('gray', 100)] - The background used for the tabs on hover.
/// @prop {Map} item-active-background [color: ('gray', 100)] - The color used for the active/focused tab background.
/// @prop {Map} item-active-hover-background [color: ('gray', 100)] - The color used for the active tab background on hover and focus.
/// @requires $material-tabs
/// @requires $base-dark-tabs
$dark-material-tabs: extend(
Expand All @@ -46,7 +46,7 @@ $dark-material-tabs: extend(
100,
),
),
item-active-background: (
item-active-hover-background: (
color: (
'gray',
100,
Expand All @@ -63,7 +63,7 @@ $dark-material-tabs: extend(
/// @prop {Map} item-disabled-color [color: ('gray', 300)] - The color used for the disabled tabs text.
/// @prop {Map} item-disabled-icon-color [color: ('gray', 300)] - The color used for the disabled tab icon.
/// @prop {Map} item-hover-background [color: ('gray', 50)] - The background used for the tabs on hover.
/// @prop {Map} item-active-background [color: ('gray', 50)] - The color used for the active/focused tab background.
/// @prop {Map} item-active-hover-background [color: ('gray', 50)] - The color used for the active tab background on hover and focus.
/// @prop {Map} button-disabled-color [color: ('gray', 200)] - The color used for the disabled button icon/text.
/// @prop {Map} indicator-color [color: ('primary', 300)] - The color used for the active tab indicator.
/// @type {Map}
Expand Down Expand Up @@ -92,7 +92,7 @@ $dark-fluent-tabs: extend(
50,
),
),
item-active-background: (
item-active-hover-background: (
color: (
'gray',
50,
Expand Down Expand Up @@ -133,13 +133,16 @@ $dark-bootstrap-tabs: extend(
/// Generates a dark indigo tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-background [contrast-color: ('gray', 50, .1)] - The background used for the tabs on hover.
/// @prop {Map} item-active-hover-background [contrast-color: ('gray', 50, .1)] - The color used for the active tab background on hover and focus.
/// @prop {Map} item-text-color [contrast-color: ('gray', 50, .8)] - The color used for the tab text color.
/// @prop {Map} item-hover-color [contrast-color: ('gray', 50)] - The text color used for the tabs on hover.
/// @prop {Map} item-active-color [contrast-color: ('gray', 50)] - The color used for the active tabs text.
/// @prop {Map} item-active-hover-color [contrast-color: ('gray', 50)] - The color used for the active tabs text on hover and focus.
/// @prop {Map} item-disabled-color [contrast-color: ('gray', 50, .2)] - The color used for the disabled tabs text.
/// @prop {Map} item-icon-color [contrast-color: ('gray', 50, .6)] - The color used for the tab icon.
/// @prop {Map} item-hover-icon-color [contrast-color: ('gray', 50, .8)] - The color used for the tab icon on hover.
/// @prop {Map} item-active-icon-color [contrast-color: ('gray', 50, .8)] - The color used for the active tab icon.
/// @prop {Map} item-active-hover-icon-color [contrast-color: ('gray', 50, .8)] - The color used for the active tab icon on hover and focus.
/// @prop {Map} item-disabled-icon-color [contrast-color: ('gray', 50, .2)] - The color used for the disabled tab icon.
/// @prop {Map} border-color [contrast-color: ('gray', 50, .15)] - The color used for the tab items bottom border.
/// @prop {Map} border-color--hover [contrast-color: ('gray', 50, .15)] - The color used for the tab items bottom border on hover/focus.
Expand All @@ -158,6 +161,13 @@ $dark-indigo-tabs: extend(
0.1,
),
),
item-active-hover-background: (
contrast-color: (
'gray',
50,
0.1,
),
),
item-text-color: (
contrast-color: (
'gray',
Expand All @@ -177,6 +187,12 @@ $dark-indigo-tabs: extend(
50,
),
),
item-active-hover-color: (
contrast-color: (
'gray',
50,
),
),
item-disabled-color: (
contrast-color: (
'gray',
Expand Down Expand Up @@ -205,6 +221,13 @@ $dark-indigo-tabs: extend(
0.8,
),
),
item-active-hover-icon-color: (
contrast-color: (
'gray',
50,
0.8,
),
),
item-disabled-icon-color: (
contrast-color: (
'gray',
Expand Down
Loading