@sbb-esta/lyne-elements 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-group/action-group.component.js +1 -1
- package/alert/alert/alert.component.js +1 -1
- package/autocomplete/autocomplete-base-element.d.ts +5 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete-base-element.js +72 -59
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/badge.css +1 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.js +4 -4
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +1 -1
- package/button/common.js +1 -1
- package/button/mini-button/mini-button.component.js +1 -1
- package/button.js +1 -1
- package/calendar/calendar.component.js +1 -1
- package/card/card/card.component.js +1 -1
- package/card/card-badge/card-badge.component.js +1 -1
- package/carousel/carousel-list/carousel-list.component.d.ts +8 -3
- package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/carousel/carousel-list/carousel-list.component.js +62 -40
- package/checkbox/checkbox-group/checkbox-group.component.js +1 -1
- package/chip/chip/chip.component.js +1 -1
- package/chip/chip-group/chip-group.component.js +1 -1
- package/chip-label/chip-label.component.js +1 -1
- package/container/container/container.component.js +11 -11
- package/container/sticky-bar/sticky-bar.component.js +9 -9
- package/core/mixins.js +1 -1
- package/core/overlay/overlay-option-panel.d.ts +2 -1
- package/core/overlay/overlay-option-panel.d.ts.map +1 -1
- package/core/overlay/overlay-option-panel.js +8 -5
- package/core/overlay/position.d.ts +2 -0
- package/core/overlay/position.d.ts.map +1 -1
- package/core/overlay/position.js +19 -17
- package/core/styles/layout.scss +4 -0
- package/core/styles/mixins/badge.scss +3 -0
- package/core/styles/mixins/layout.scss +5 -4
- package/core/styles/mixins/link.scss +0 -11
- package/custom-elements.json +352 -197
- package/date-input/date-input.component.js +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts +5 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete-base-element.js +25 -5
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -2
- package/development/carousel/carousel-list/carousel-list.component.d.ts +8 -3
- package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/development/carousel/carousel-list/carousel-list.component.js +51 -19
- package/development/container/container/container.component.js +3 -3
- package/development/container/sticky-bar/sticky-bar.component.js +5 -5
- package/development/core/overlay/overlay-option-panel.d.ts +2 -1
- package/development/core/overlay/overlay-option-panel.d.ts.map +1 -1
- package/development/core/overlay/overlay-option-panel.js +6 -3
- package/development/core/overlay/position.d.ts +2 -0
- package/development/core/overlay/position.d.ts.map +1 -1
- package/development/core/overlay/position.js +3 -2
- package/development/footer/footer.component.js +3 -3
- package/development/header/header/header.component.js +3 -3
- package/development/lead-container/lead-container.component.js +8 -7
- package/development/link/common/block-link-common.js +2 -12
- package/development/link/common/inline-link-common.js +2 -10
- package/development/link/common/link-common.js +1 -1
- package/development/link/common.js +1 -1
- package/development/{link-common-DPLJx5Uo.js → link-common-BDFF9Oiz.js} +1 -3
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -2
- package/development/link.js +1 -1
- package/development/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -1
- package/development/mini-calendar/mini-calendar/mini-calendar.component.js +5 -7
- package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +3 -3
- package/development/paginator/common/paginator-common.d.ts +2 -1
- package/development/paginator/common/paginator-common.d.ts.map +1 -1
- package/development/paginator/common/paginator-common.js +87 -49
- package/development/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
- package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
- package/development/paginator/paginator/paginator.component.d.ts +6 -0
- package/development/paginator/paginator/paginator.component.d.ts.map +1 -1
- package/development/paginator/paginator/paginator.component.js +19 -4
- package/development/tag/tag/tag.component.js +2 -1
- package/dialog/dialog/dialog.component.js +1 -1
- package/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
- package/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +1 -1
- package/file-selector/common.js +1 -1
- package/file-selector-common-BEWjyy75.js +5 -0
- package/file-selector.js +1 -1
- package/flip-card/flip-card/flip-card.component.js +1 -1
- package/flip-card/flip-card-summary/flip-card-summary.component.js +1 -1
- package/footer/footer.component.js +8 -8
- package/form-error/form-error.component.js +1 -1
- package/form-field/form-field/form-field.component.js +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +1 -1
- package/header/common/header-action-common.js +1 -1
- package/header/header/header.component.js +32 -32
- package/icon-sidebar-button-common-XcKoF2SP.js +7 -0
- package/layout.css +9 -3
- package/lead-container/lead-container.component.js +8 -8
- package/link/common/block-link-common.js +25 -25
- package/link/common/inline-link-common.js +7 -7
- package/link/common/link-common.js +1 -1
- package/link/common.js +1 -1
- package/link-common-nA3q92jp.js +46 -0
- package/link-list/link-list/link-list.component.js +1 -1
- package/link-list/link-list-anchor/link-list-anchor.component.js +5 -5
- package/link.js +1 -1
- package/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
- package/logo/logo.component.js +1 -1
- package/map-container/map-container.component.js +1 -1
- package/menu/common/menu-action-common.js +1 -1
- package/menu/menu/menu.component.js +1 -1
- package/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -1
- package/mini-calendar/mini-calendar/mini-calendar.component.js +5 -9
- package/mini-calendar/mini-calendar-day/mini-calendar-day.component.js +1 -1
- package/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +16 -16
- package/navigation/common/navigation-action-common.js +1 -1
- package/navigation/navigation/navigation.component.js +1 -1
- package/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/navigation/navigation-section/navigation-section.component.js +1 -1
- package/notification/notification.component.js +1 -1
- package/off-brand-theme.css +10 -3
- package/option/option/option.component.js +1 -1
- package/overlay/overlay.component.js +1 -1
- package/package.json +1 -1
- package/paginator/common/paginator-common.d.ts +2 -1
- package/paginator/common/paginator-common.d.ts.map +1 -1
- package/paginator/common/paginator-common.js +102 -81
- package/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
- package/paginator/compact-paginator/compact-paginator.component.js +2 -1
- package/paginator/paginator/paginator.component.d.ts +6 -0
- package/paginator/paginator/paginator.component.d.ts.map +1 -1
- package/paginator/paginator/paginator.component.js +57 -45
- package/popover/popover/popover.component.js +1 -1
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/radio-button/common.js +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.js +1 -1
- package/radio-button-common-Bw2t3Sxz.js +5 -0
- package/radio-button.js +1 -1
- package/safety-theme.css +10 -3
- package/select/select.component.js +1 -1
- package/selection-expansion-panel/selection-expansion-panel.component.js +1 -1
- package/sidebar/common.js +1 -1
- package/sidebar/sidebar-container/sidebar-container.component.js +1 -1
- package/sidebar.js +1 -1
- package/signet/signet.component.js +1 -1
- package/slider/slider.component.js +1 -1
- package/standard-theme.css +10 -3
- package/stepper/step-label/step-label.component.js +1 -1
- package/stepper/stepper/stepper.component.js +1 -1
- package/tabs/tab-label/tab-label.component.js +1 -1
- package/tag/tag/tag.component.js +4 -4
- package/teaser/teaser.component.js +1 -1
- package/teaser-hero/teaser-hero.component.js +1 -1
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/teaser-product-common-Du28QCY3.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +1 -1
- package/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +1 -1
- package/toggle/toggle/toggle.component.js +1 -1
- package/toggle-check/toggle-check.component.js +1 -1
- package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/train/train-formation/train-formation.component.js +1 -1
- package/train/train-wagon/train-wagon.component.js +1 -1
- package/transparent-button-DJIkG5hj.js +9 -0
- package/visual-checkbox/visual-checkbox.component.js +1 -1
- package/file-selector-common-D88J9PEh.js +0 -5
- package/icon-sidebar-button-common-BeRXvifI.js +0 -7
- package/link-common-BBKGg9HN.js +0 -46
- package/radio-button-common-Nm9ULjVb.js +0 -5
- package/teaser-product-common-DIra6aVg.js +0 -5
- package/transparent-button-Bg9fU_iZ.js +0 -9
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @param optionContainer The reference to the option panel.
|
|
6
6
|
* @param container The element which has the position:fixed applied.
|
|
7
7
|
* @param element The reference to the component.
|
|
8
|
+
* @param position The allowed position of the overlay relative to the origin.
|
|
8
9
|
*/
|
|
9
|
-
export declare function setOverlayPosition(dialog: HTMLElement, originElement: HTMLElement, optionContainer: HTMLElement, container: HTMLElement, element: HTMLElement): void;
|
|
10
|
+
export declare function setOverlayPosition(dialog: HTMLElement, originElement: HTMLElement, optionContainer: HTMLElement, container: HTMLElement, element: HTMLElement, position?: 'auto' | 'above' | 'below'): void;
|
|
10
11
|
//# sourceMappingURL=overlay-option-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-option-panel.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-option-panel.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"overlay-option-panel.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-option-panel.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,WAAW,EAC1B,eAAe,EAAE,WAAW,EAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,MAAM,GAAG,OAAO,GAAG,OAAgB,GAC5C,IAAI,CAsBN"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { getElementPosition as
|
|
2
|
-
function
|
|
3
|
-
if (!
|
|
1
|
+
import { getElementPosition as r } from "./position.js";
|
|
2
|
+
function b(e, o, i, a, t, p = "auto") {
|
|
3
|
+
if (!e || !o)
|
|
4
4
|
return;
|
|
5
5
|
t.style.setProperty("--sbb-options-panel-width", `${o.offsetWidth}px`), t.style.setProperty("--sbb-options-panel-origin-height", `${o.offsetHeight}px`);
|
|
6
|
-
const s =
|
|
6
|
+
const s = r(i, o, a, {
|
|
7
|
+
forceBelow: p === "below",
|
|
8
|
+
forceAbove: p === "above"
|
|
9
|
+
});
|
|
7
10
|
t.style.setProperty("--sbb-options-panel-position-x", `${s.left}px`), t.style.setProperty("--sbb-options-panel-position-y", `${s.top}px`), t.style.setProperty("--sbb-options-panel-max-height", s.maxHeight), t.setAttribute("data-options-panel-position", s.alignment.vertical), o.setAttribute("data-options-panel-position", s.alignment.vertical);
|
|
8
11
|
}
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
b as setOverlayPosition
|
|
11
14
|
};
|
|
@@ -37,6 +37,8 @@ export declare function getElementPosition(element: HTMLElement, trigger: HTMLEl
|
|
|
37
37
|
horizontalOffset?: number;
|
|
38
38
|
centered?: boolean;
|
|
39
39
|
responsiveHeight?: boolean;
|
|
40
|
+
forceAbove?: boolean;
|
|
41
|
+
forceBelow?: boolean;
|
|
40
42
|
}): SbbElementPositionInfos;
|
|
41
43
|
/**
|
|
42
44
|
* Determines the position of an element relative to a trigger element by evaluating
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/position.ts"],"names":[],"mappings":"AAAA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
if (c !== "none" &&
|
|
2
|
+
const o = window.getComputedStyle(t), c = o.display, s = parseInt(o.maxHeight, 10).toString();
|
|
3
|
+
if (c !== "none" && s !== "0")
|
|
4
4
|
return {
|
|
5
5
|
scrollHeight: t.scrollHeight,
|
|
6
6
|
clientHeight: t.clientHeight,
|
|
@@ -10,8 +10,8 @@ function R(t) {
|
|
|
10
10
|
offsetWidth: t.offsetWidth
|
|
11
11
|
};
|
|
12
12
|
t.style.position = "absolute", t.style.visibility = "hidden", t.style.display = "block";
|
|
13
|
-
const
|
|
14
|
-
return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight:
|
|
13
|
+
const p = t.scrollHeight, n = t.clientHeight, g = t.offsetHeight, r = t.scrollWidth, e = t.clientWidth, i = t.offsetWidth;
|
|
14
|
+
return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight: p, clientHeight: n, offsetHeight: g, scrollWidth: r, clientWidth: e, offsetWidth: i };
|
|
15
15
|
}
|
|
16
16
|
function x(t, o) {
|
|
17
17
|
if (!t || !o)
|
|
@@ -19,33 +19,35 @@ function x(t, o) {
|
|
|
19
19
|
const c = t.getBoundingClientRect();
|
|
20
20
|
return c.top <= o.clientY && o.clientY <= c.top + c.height && c.left <= o.clientX && o.clientX <= c.left + c.width;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const n =
|
|
24
|
-
let
|
|
22
|
+
function w(t, o, c, s) {
|
|
23
|
+
const n = s?.verticalOffset || 0, g = s?.horizontalOffset || 0, r = s?.responsiveHeight || !1, e = o.getBoundingClientRect(), i = R(t), f = e.left, H = e.top, W = document.documentElement.clientWidth - (f + e.width), d = H - n, u = document.documentElement.clientHeight - (H + e.height + n);
|
|
24
|
+
let h = f, m = H + e.height + n, l = i.offsetWidth - e.width;
|
|
25
25
|
const a = { horizontal: "start", vertical: "below" };
|
|
26
26
|
let O = `${u - n}px`;
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
27
|
+
s?.centered && f - 16 + e.width / 2 > i.offsetWidth / 2 && W - 16 > l / 2 && (h -= l /= 2, a.horizontal = "center"), W < l && f > l && (h = h - l, a.horizontal = "end"), g && a.horizontal !== "center" && e.width / 2 < g && (h += g * (a.horizontal === "start" ? -1 : 1)), (f < l && W < l || document.documentElement.clientWidth < i.offsetWidth) && (h = document.documentElement.clientWidth / 2 - i.offsetWidth / 2);
|
|
28
|
+
const b = u - n < i.scrollHeight && d - n > (r ? i.clientHeight : i.scrollHeight) || d > u && u - n < i.clientHeight && !r;
|
|
29
|
+
!s?.forceBelow && (s?.forceAbove || b) && (m = d < i.scrollHeight ? m - e.height - d - n : H - i.clientHeight - n, O = `${d - n}px`, a.vertical = "above");
|
|
30
|
+
const v = c.getBoundingClientRect();
|
|
31
|
+
return v.left < 0 && (h -= v.left), v.top < 0 && (m -= v.top), {
|
|
30
32
|
top: m,
|
|
31
|
-
left:
|
|
33
|
+
left: h,
|
|
32
34
|
maxHeight: O,
|
|
33
35
|
alignment: a
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
|
-
function
|
|
37
|
-
const n =
|
|
38
|
+
function y(t, o, c, s) {
|
|
39
|
+
const n = s?.verticalOffset || 0, g = s?.horizontalOffset || 0, r = o.getBoundingClientRect(), e = R(t), i = o.parentElement.shadowRoot.querySelector(s?.contentSelector ?? `.${t.className}`).getBoundingClientRect(), f = c.getBoundingClientRect(), H = document.documentElement.clientWidth - i.right, W = document.documentElement.clientHeight - (r.top - n), d = document.documentElement.clientHeight, u = `${d - 32}px`, h = { horizontal: "end", vertical: "above" }, m = e.offsetWidth + g;
|
|
38
40
|
let l = i.right, a = r.top + n;
|
|
39
|
-
return H < m && r.left > m && (l = l - i.width - e.offsetWidth,
|
|
41
|
+
return H < m && r.left > m && (l = l - i.width - e.offsetWidth, h.horizontal = "start"), g && h.horizontal !== "center" && (l += g * (h.horizontal === "start" ? -1 : 1)), W < e.scrollHeight && (a = d - e.clientHeight - 16), f.left < 0 && (l -= f.left), f.top < 0 && (a -= f.top), {
|
|
40
42
|
top: a,
|
|
41
43
|
left: l,
|
|
42
44
|
maxHeight: u,
|
|
43
|
-
alignment:
|
|
45
|
+
alignment: h
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
w as getElementPosition,
|
|
50
|
+
y as getElementPositionHorizontal,
|
|
49
51
|
R as getElementRectangle,
|
|
50
52
|
x as isEventOnElement
|
|
51
53
|
};
|
package/core/styles/layout.scss
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
color: var(--sbb-color-1-negative);
|
|
13
13
|
min-width: var(--sbb-spacing-fixed-4x);
|
|
14
14
|
max-height: var(--sbb-spacing-fixed-4x);
|
|
15
|
+
|
|
16
|
+
// Transparent outline is visible in forced colors mode to ensure readability
|
|
17
|
+
outline: var(--sbb-border-width-1x) solid transparent;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
@mixin badge-attribute {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '../core/mediaqueries';
|
|
2
2
|
|
|
3
3
|
@mixin page-spacing {
|
|
4
|
-
padding-inline: var(--sbb-layout-base-offset-responsive);
|
|
4
|
+
padding-inline: var(--sbb-page-spacing-padding, var(--sbb-layout-base-offset-responsive));
|
|
5
5
|
margin-inline: auto;
|
|
6
6
|
|
|
7
7
|
// If using page-spacing in flex context,
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
@include mediaqueries.mq($from: ultra) {
|
|
12
12
|
// Subtract padding to get real max-width
|
|
13
|
-
max-width:
|
|
14
|
-
|
|
13
|
+
max-width: var(
|
|
14
|
+
--sbb-spacing-max-width,
|
|
15
|
+
calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))
|
|
15
16
|
);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
@mixin page-spacing-expanded {
|
|
20
|
-
padding-inline: var(--sbb-spacing-responsive-xxs);
|
|
21
|
+
padding-inline: var(--sbb-page-spacing-padding, var(--sbb-spacing-responsive-xxs));
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
@mixin grid-base {
|
|
@@ -6,17 +6,10 @@
|
|
|
6
6
|
@mixin link-common-variables {
|
|
7
7
|
--sbb-link-color-hover: light-dark(var(--sbb-color-primary125), var(--sbb-color-graphite));
|
|
8
8
|
--sbb-link-color-active: light-dark(var(--sbb-color-primary150), var(--sbb-color-metal));
|
|
9
|
-
--sbb-link-text-decoration-color: light-dark(
|
|
10
|
-
color-mix(in srgb, currentcolor 80%, white),
|
|
11
|
-
color-mix(in srgb, currentcolor 80%, black)
|
|
12
|
-
);
|
|
13
|
-
--sbb-link-text-decoration-color-hover: currentcolor;
|
|
14
9
|
}
|
|
15
10
|
|
|
16
11
|
@mixin link-common-variables--negative {
|
|
17
12
|
--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);
|
|
18
|
-
--sbb-link-text-decoration-color: color-mix(in srgb, currentcolor 80%, black);
|
|
19
|
-
--sbb-link-text-decoration-color-hover: currentcolor;
|
|
20
13
|
}
|
|
21
14
|
|
|
22
15
|
@mixin block-link-variables {
|
|
@@ -39,14 +32,12 @@
|
|
|
39
32
|
@mixin block-link-variables--active {
|
|
40
33
|
--sbb-link-color-normal: light-dark(var(--sbb-color-black), var(--sbb-color-cement));
|
|
41
34
|
--sbb-link-text-decoration-line: underline;
|
|
42
|
-
--sbb-link-text-decoration-color: currentcolor;
|
|
43
35
|
}
|
|
44
36
|
|
|
45
37
|
// To display a current active page, e.g. if the CSS class sbb-active is set
|
|
46
38
|
@mixin block-link-variables--active-negative {
|
|
47
39
|
--sbb-link-color-normal: var(--sbb-color-cement);
|
|
48
40
|
--sbb-link-text-decoration-line: underline;
|
|
49
|
-
--sbb-link-text-decoration-color: currentcolor;
|
|
50
41
|
}
|
|
51
42
|
|
|
52
43
|
@mixin link-variables {
|
|
@@ -73,7 +64,6 @@
|
|
|
73
64
|
@mixin link-base {
|
|
74
65
|
color: var(--sbb-link-color-normal);
|
|
75
66
|
text-decoration-line: var(--sbb-link-text-decoration-line, underline);
|
|
76
|
-
text-decoration-color: var(--sbb-link-text-decoration-color);
|
|
77
67
|
text-decoration-thickness: #{functions.px-to-rem-build(1)};
|
|
78
68
|
text-underline-offset: 0.3125em; // 5px
|
|
79
69
|
user-select: none;
|
|
@@ -95,7 +85,6 @@
|
|
|
95
85
|
@include mediaqueries.hover-mq($hover: true) {
|
|
96
86
|
color: var(--sbb-link-color-hover);
|
|
97
87
|
text-decoration-line: var(--sbb-link-hover-text-decoration, underline);
|
|
98
|
-
text-decoration-color: var(--sbb-link-text-decoration-color-hover);
|
|
99
88
|
}
|
|
100
89
|
}
|
|
101
90
|
|