Skip to content
7 changes: 4 additions & 3 deletions packages/components/button/src/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,13 @@ button {
appearance: none;
background: color-mix(
in srgb,
var(--_bg-color),
var(--_bg-mix-color) calc(100% * var(--_bg-opacity))
var(--sl-button-bg-color, var(--_bg-color)),
var(--sl-button-bg-mix-color, var(--_bg-mix-color))
calc(100% * var(--sl-button-bg-opacity, var(--_bg-opacity)))
);
Comment thread
michal-sanoma marked this conversation as resolved.
border: var(--sl-size-borderWidth-action) solid var(--sl-color-border-secondary-bold);
border-radius: var(--sl-size-borderRadius-default);
color: var(--sl-color-foreground-secondary-bold);
color: var(--sl-button-color, var(--sl-color-foreground-secondary-bold));
cursor: pointer;
display: inline-flex;
flex: 1;
Expand Down
42 changes: 29 additions & 13 deletions packages/components/paginator/src/paginator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,24 @@
}

.page {
--sl-button-bg-color: transparent;
--sl-button-bg-mix-color: var(--sl-color-background-neutral-interactive-plain);
--sl-button-bg-opacity: var(--sl-opacity-interactive-plain-idle);
--sl-button-color: var(--sl-color-foreground-neutral-bold);

box-sizing: border-box;
color: var(--sl-color-foreground-neutral-bold);
Comment thread
michal-sanoma marked this conversation as resolved.
Outdated
flex-shrink: 0;
inline-size: calc(1lh + (var(--sl-size-100) * 2));
padding-inline: 0;

&:hover {
--sl-button-bg-opacity: var(--sl-opacity-interactive-plain-hover);
}

&:active {
Comment thread
michal-sanoma marked this conversation as resolved.
Outdated
--sl-button-bg-opacity: var(--sl-opacity-interactive-plain-active);
}
}

:host([size='sm']) {
Expand All @@ -50,30 +63,33 @@
}

.current {
--_bg-color: var(--sl-color-background-selected-subtle);
--_bg-mix-color: var(--sl-color-background-primary-interactive-plain);
--_bg-opacity: var(--sl-opacity-interactive-plain-idle);

color: var(--sl-color-foreground-primary-bold);
--sl-button-bg-color: var(--sl-color-background-selected-subtle);
--sl-button-bg-mix-color: var(--sl-color-background-primary-interactive-plain);
--sl-button-bg-opacity: var(--sl-opacity-interactive-plain-idle);
--sl-button-color: var(--sl-color-foreground-primary-bold);

&:hover {
--_bg-opacity: var(--sl-opacity-interactive-plain-hover);
--sl-button-bg-opacity: var(--sl-opacity-interactive-plain-hover);
}

&:active {
--_bg-opacity: var(--sl-opacity-interactive-plain-active);
--sl-button-bg-opacity: var(--sl-opacity-interactive-plain-active);
}
}

:host([emphasis='bold']) .current {
--_bg-color: var(--sl-color-background-selected-bold);
--_bg-mix-color: var(--sl-color-background-selected-interactive-bold);
--sl-button-bg-color: var(--sl-color-background-selected-bold);
--sl-button-bg-mix-color: var(--sl-color-background-selected-interactive-bold);
--sl-button-color: var(--sl-color-foreground-primary-onBold);
--sl-button-bg-opacity: var(--sl-opacity-interactive-bold-idle);

color: var(--sl-color-foreground-primary-onBold);
}
&:hover {
--sl-button-bg-opacity: var(--sl-opacity-interactive-bold-hover);
}

:host([emphasis='bold']) .current:not(:hover, :active) {
--_bg-opacity: var(--sl-opacity-interactive-bold-idle);
&:active {
--sl-button-bg-opacity: var(--sl-opacity-interactive-bold-active);
}
}

.wrapper {
Expand Down
Loading