kopia lustrzana https://github.com/shoelace-style/shoelace
Refactor styles
rodzic
2349bc8074
commit
3b6fe57909
|
@ -1,10 +1,11 @@
|
||||||
@import 'component';
|
@import 'component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @prop --divider-width: The width of the dividing line.
|
||||||
* @prop --handle-size: The size of the compare handle.
|
* @prop --handle-size: The size of the compare handle.
|
||||||
*/
|
*/
|
||||||
:host {
|
:host {
|
||||||
--divider-width: 4px;
|
--divider-width: 2px;
|
||||||
--handle-size: 2.5rem;
|
--handle-size: 2.5rem;
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -17,10 +18,12 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-comparer__before {
|
.image-comparer__before,
|
||||||
|
.image-comparer__after {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
::slotted(img) {
|
::slotted(img),
|
||||||
|
::slotted(svg) {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
@ -33,13 +36,6 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
::slotted(img) {
|
|
||||||
display: block;
|
|
||||||
max-width: 100% !important;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-comparer__divider {
|
.image-comparer__divider {
|
||||||
|
@ -52,7 +48,11 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--sl-color-white);
|
background-color: var(--sl-color-white);
|
||||||
transform: translateX(calc(var(--divider-width) / -2));
|
transform: translateX(calc(var(--divider-width) / -2));
|
||||||
cursor: ew-resize;
|
cursor: grab;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-comparer__handle {
|
.image-comparer__handle {
|
||||||
|
|
Ładowanie…
Reference in New Issue