You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
246 lines
4.7 KiB
246 lines
4.7 KiB
:root { |
|
--dark-blue: #2f343d; |
|
--dark-hover: #888; |
|
--radius: 5px; |
|
--hgap: 5px; |
|
--gap: 10px; |
|
--transform-amimate: transform .1s ease-in-out; |
|
} |
|
|
|
html, body { |
|
margin: 0; |
|
padding: 0; |
|
width: 100%; |
|
height: 100%; |
|
overflow: hidden; |
|
} |
|
|
|
canvas { |
|
width: 100%; |
|
height: 100%; |
|
display: block; |
|
cursor: crosshair; |
|
} |
|
|
|
canvas.movemode { |
|
cursor: grab; |
|
} |
|
|
|
canvas.movemode.moving { |
|
cursor: grabbing; |
|
} |
|
|
|
.tools-wrapper { |
|
position: fixed; |
|
bottom: 0; |
|
width: 100%; |
|
display: flex; |
|
justify-content: center; |
|
align-items: end; |
|
z-index: 10; |
|
pointer-events: none; |
|
} |
|
|
|
.pallete-wrapper, |
|
.sizer-wrapper { |
|
position: fixed; |
|
top: 0; |
|
left: 0; |
|
height: 100%; |
|
pointer-events: none; |
|
display: flex; |
|
flex-direction: column; |
|
justify-content: center; |
|
transition: var(--transform-amimate); |
|
} |
|
|
|
.sizer-wrapper { |
|
height: unset; |
|
width: 100%; |
|
flex-direction: row; |
|
} |
|
|
|
.pallete { |
|
pointer-events: all; |
|
display: grid; |
|
flex-direction: column; |
|
align-items: center; |
|
background: var(--dark-blue); |
|
border-top-right-radius: var(--radius); |
|
border-bottom-right-radius: var(--radius); |
|
/* border-bottom-left-radius: var(--radius);*/ |
|
padding-top: var(--gap); |
|
padding-bottom: var(--gap); |
|
} |
|
|
|
.pallete-wrapper.hidden { |
|
transform: translateX(-125%); /* to account for a selected color, which is also offset to the right */ |
|
} |
|
|
|
.sizer-wrapper.hidden { |
|
transform: translateY(-125%); |
|
} |
|
|
|
.pallete .color { |
|
padding: var(--gap); |
|
cursor: pointer; |
|
background: var(--dark-blue); |
|
transition: var(--transform-amimate); |
|
} |
|
|
|
.pallete .color:hover { |
|
background: var(--dark-hover); |
|
} |
|
|
|
.pallete .color.active { |
|
transform: translateX(10px); |
|
border-top-right-radius: var(--radius); |
|
border-bottom-right-radius: var(--radius); |
|
} |
|
|
|
.pallete .color.active:hover { |
|
background: var(--dark-blue); |
|
} |
|
|
|
.pallete .color-pane { |
|
width: 24px; |
|
height: 24px; |
|
box-sizing: border-box; |
|
border-radius: var(--radius); |
|
} |
|
|
|
.tools, |
|
.sizer { |
|
pointer-events: all; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
background: var(--dark-blue); |
|
border-radius: var(--radius); |
|
border-bottom-right-radius: 0; |
|
border-bottom-left-radius: 0; |
|
height: 42px; |
|
padding-left: var(--gap); |
|
padding-right: var(--gap); |
|
} |
|
|
|
.sizer { |
|
border-radius: 0; |
|
border-bottom-right-radius: var(--radius); |
|
border-bottom-left-radius: var(--radius); |
|
} |
|
|
|
.tool { |
|
cursor: pointer; |
|
padding-left: var(--gap); |
|
padding-right: var(--gap); |
|
height: 100%; |
|
display: flex; |
|
align-items: center; |
|
background: var(--dark-blue); |
|
transition: var(--transform-amimate); |
|
user-select: none; |
|
} |
|
|
|
.tool:hover { |
|
background: var(--dark-hover); |
|
} |
|
|
|
.tool.active { |
|
transform: translateY(-10px); |
|
border-top-right-radius: var(--radius); |
|
border-top-left-radius: var(--radius); |
|
background: var(--dark-blue); |
|
} |
|
|
|
.tool img { |
|
height: 24px; |
|
width: 24px; |
|
filter: invert(100%); |
|
} |
|
|
|
input[type=range] { |
|
-webkit-appearance: none; |
|
width: 200px; |
|
background: transparent; |
|
} |
|
|
|
input[type=range]:focus { |
|
outline: none; |
|
} |
|
|
|
input[type=range]::-webkit-slider-thumb { |
|
-webkit-appearance: none; |
|
border: none; |
|
background: white; |
|
height: 20px; |
|
width: 20px; |
|
border-radius: 50%; |
|
cursor: pointer; |
|
border: 2px solid var(--dark-blue); |
|
margin-top: -6px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */ |
|
} |
|
|
|
input[type=range]::-moz-range-thumb { |
|
border: none; |
|
background: white; |
|
height: 16px; |
|
width: 16px; |
|
border-radius: 50%; |
|
cursor: pointer; |
|
border: 2px solid var(--dark-blue); |
|
} |
|
|
|
input[type=range]::-webkit-slider-runnable-track { |
|
width: 100%; |
|
height: 8px; |
|
cursor: pointer; |
|
background: white; |
|
border-radius: 2px; |
|
border: none; |
|
} |
|
|
|
input[type=range]:focus::-webkit-slider-runnable-track { |
|
width: 100%; |
|
height: 8px; |
|
cursor: pointer; |
|
background: white; |
|
border-radius: 2px; |
|
border: none; |
|
} |
|
|
|
input[type=range]::-moz-range-track { |
|
width: 100%; |
|
height: 8px; |
|
cursor: pointer; |
|
background: white; |
|
border-radius: 2px; |
|
border: none; |
|
} |
|
|
|
.phone-extra-controls { |
|
display: none; |
|
cursor: pointer; /* for click events on mobile */ |
|
pointer-events: all; |
|
position: absolute; |
|
right: 0; |
|
background: var(--dark-blue); |
|
height: 42px; |
|
justify-content: center; |
|
align-items: center; |
|
padding-left: var(--gap); |
|
padding-right: var(--gap); |
|
border-top-left-radius: var(--radius); |
|
} |
|
|
|
.phone-extra-controls img { |
|
height: 24px; |
|
width: 24px; |
|
filter: invert(100%); |
|
} |
|
|
|
@media (hover: none) and (pointer: coarse) { |
|
.phone-extra-controls { |
|
display: flex; |
|
} |
|
} |