sudovanilla-website/public/@shoelace-style/shoelace/cdn/chunks/chunk.ATEI77YH.js
2024-05-13 23:34:06 -04:00

86 lines
1.8 KiB
JavaScript

import {
component_styles_default
} from "./chunk.K23QWHWK.js";
import {
i
} from "./chunk.CXZZ2LVK.js";
// src/components/image-comparer/image-comparer.styles.ts
var image_comparer_styles_default = i`
${component_styles_default}
:host {
--divider-width: 2px;
--handle-size: 2.5rem;
display: inline-block;
position: relative;
}
.image-comparer {
max-width: 100%;
max-height: 100%;
overflow: hidden;
}
.image-comparer__before,
.image-comparer__after {
display: block;
pointer-events: none;
}
.image-comparer__before::slotted(img),
.image-comparer__after::slotted(img),
.image-comparer__before::slotted(svg),
.image-comparer__after::slotted(svg) {
display: block;
max-width: 100% !important;
height: auto;
}
.image-comparer__after {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.image-comparer__divider {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
width: var(--divider-width);
height: 100%;
background-color: var(--sl-color-neutral-0);
translate: calc(var(--divider-width) / -2);
cursor: ew-resize;
}
.image-comparer__handle {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: calc(50% - (var(--handle-size) / 2));
width: var(--handle-size);
height: var(--handle-size);
background-color: var(--sl-color-neutral-0);
border-radius: var(--sl-border-radius-circle);
font-size: calc(var(--handle-size) * 0.5);
color: var(--sl-color-neutral-700);
cursor: inherit;
z-index: 10;
}
.image-comparer__handle:focus-visible {
outline: var(--sl-focus-ring);
outline-offset: var(--sl-focus-ring-offset);
}
`;
export {
image_comparer_styles_default
};