odin-etch-a-sketch/style.css
2023-11-12 23:23:17 -07:00

272 lines
No EOL
4.9 KiB
CSS

html {
height: 100%;
--range-value: 100%;
--canvas-color: rgb(180, 254, 235);
}
body{
background-image: linear-gradient(160deg, #a50071, #4b588c, #5fa66a, #017070);
background-attachment: fixed;
color: #eee;
text-align: center;
font-family: "Andale Mono", monospace;
display: flex;
flex-direction: column;
height: 100vh;
margin: 0;
}
header {
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
background: #111;
opacity: .8;
width: 100%;
flex: 0 0 auto;
}
main {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
}
.tool-labels {
margin: 13px 0;
font-size: 24px;
color: #68ffd8;
}
footer {
width: 100%;
background-color: #111;
opacity: .8;
flex: 0 0 auto;
}
button, .container, .color-input, .knob-shadow, .range-slider {
box-shadow: 1px 2px 10px 1px #555;
}
button, .container, .color-input, .knob {
cursor: pointer;
background-color: #f0fbf8;
border: none;
color: #000;
}
button:hover, .container:hover, .color-input:hover {
background-color: #68ffd8;
}
button:active, .container:active, .color-input:active{
background-color: #017070;
color: #f0fbf8;
}
.pen-input, .grid-input {
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 20px;
}
.pen-color, .pen-tools, .grid-tools,
.col-picker, .background-col-picker {
display: flex;
flex-direction: column;
align-items: center;
}
.col-picker, .background-col-picker {
margin: 5px;
width: 100px;
padding: 0 10px;
}
.sub-labels {
padding-bottom: 5px;
font-size: 18px;
color: #f0fbf8;
}
.color-input {
width: 120%;
height: 25px;
}
button {
display: block;
width: 120px;
height: 25px;
margin: 5px;
font-size: 18px;
}
.container{
border: 1px solid #bbb;
height: 500px;
width: 100%;
max-width: 500px;
display: flex;
flex-wrap: wrap;
background: rgb(180, 254, 235);
will-change: contents;
}
.grid {
box-sizing: border-box;
}
.grid-on {
border: 1px solid #bbb;
}
.grid-off {
border: none;
}
.slider {
display: flex;
flex-direction: column;
margin: 0 10px;
align-items: center;
font-size: 18px;
}
.range-slider {
appearance: none;
width: 100%;
height: 12px;
background: rgb(180, 254, 235);
border-radius: 6px;
margin-bottom: 20px;
}
input[type="range"]::-moz-range-thumb {
appearance: none;
width: 20px;
height: 20px;
border-radius: 6px;
background: #f0fbf8;
cursor: pointer;
box-shadow: 1px 2px 10px 1px #555;
}
input[type="range"]::-moz-range-thumb:hover {
background-color: #68ffd8;
}
input[type="range"]::-moz-range-thumb:active{
background-color: #68ffd8;
}
input[type="range"]::-moz-range-track {
height: 12px;
border-radius: 6px;
background: linear-gradient(to right, var(--canvas-color) 0%, var(--canvas-color) var(--range-value), #bbb var(--range-value), #bbb 100%);
}
input[type="range"]::-webkit-slider-thumb {
appearance: none;
width: 20px;
height: 20px;
border-radius: 6px;
background: #f0fbf8;
cursor: pointer;
transform: translateY(-15%);
box-shadow: 1px 2px 10px 1px #555;
}
input[type="range"]::-webkit-slider-thumb:hover {
background-color: #68ffd8;
}
input[type="range"]::-webkit-slider-thumb:active {
background-color: #68ffd8;
}
input[type="range"]::-webkit-slider-runnable-track {
height: 12px;
border-radius: 6px;
background: linear-gradient(to right, var(--canvas-color) 0%, var(--canvas-color) var(--range-value), #bbb var(--range-value), #bbb 100%);;
}
#gridSlider {
display: none;
}
.knob-container {
position: relative;
}
.knob-shadow {
width: 95px;
height: 95px;
border-radius: 50%;
position: absolute;
top: 5%;
left: 1%;
z-index: -1;
}
.knob {
width: 95px;
height: 95px;
border-radius: 50%;
margin-top: 5px;
position: relative;
z-index: 1;
transform-style: preserve-3d;
will-change: transform;
}
.knotch {
width: 10px;
height: 10px;
border-radius: 50%;
cursor: pointer;
background: #111;
position: relative;
top: 15%;
left: 50%;
transform: translate(-50%, -50%);
}
.knobless-grid-tools {
display: block;
}
.grid-buttons {
display: flex;
flex-direction: column;
}
@media screen and (max-width: 900px) {
header {
font-size: 20px;
}
main {
flex-direction: column;
}
.pen-color, .pen-tools, .grid-tools {
flex-direction: row; /* Switch to a row layout when wrapping occurs */
align-items: flex-end;
justify-content: center;
flex-wrap: wrap;
}
#h3-pen-color{
margin-bottom: -13px;
}
.sub-labels {
display: flex;
flex-direction: column;
}
}
@media screen and (max-width: 559px) {
#h3-pen-color {
margin: 13px 0;
}
}