Adjust styles and default behavior and partially fix knob rending during rotation
This commit is contained in:
parent
cb83a95351
commit
656c11446f
2 changed files with 39 additions and 24 deletions
|
|
@ -49,7 +49,7 @@ rangeKnob.addEventListener("mousedown", (e) => {
|
|||
function resetGrid() {
|
||||
gridSlider.value = gridSlider.defaultValue;
|
||||
container.style.backgroundColor = "rgb(180, 254, 235)";
|
||||
backColorPicker.value = "#ffffff";
|
||||
backColorPicker.value = "#b4feeb";
|
||||
colorPicker.value = "#000000";
|
||||
colorValue = "black";
|
||||
rangeKnob.style.transform = `rotate(${gridSlider.value}deg)`;
|
||||
|
|
|
|||
53
style.css
53
style.css
|
|
@ -42,6 +42,11 @@ footer {
|
|||
opacity: .8;
|
||||
}
|
||||
|
||||
button, .container, .color-input, .knob {
|
||||
box-shadow: 1px 2px 10px 1px #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pen-input, .grid-input {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -56,15 +61,6 @@ footer {
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px) {
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.col-picker, .background-col-picker {
|
||||
margin: 5px;
|
||||
width: 100px;
|
||||
|
|
@ -78,11 +74,14 @@ footer {
|
|||
|
||||
.color-input {
|
||||
width: 120%;
|
||||
height: 25px;
|
||||
|
||||
}
|
||||
|
||||
button {
|
||||
display: block;
|
||||
width: 120px;
|
||||
height: 25px;
|
||||
margin: 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
|
@ -94,6 +93,19 @@ button {
|
|||
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 {
|
||||
|
|
@ -112,11 +124,11 @@ button {
|
|||
width: 95px;
|
||||
height: 95px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #111;
|
||||
cursor: pointer;
|
||||
background: #bbb;
|
||||
box-shadow: 1px 2px 10px 1px #555;
|
||||
margin-top: 5px;
|
||||
transform-style: preserve-3d;
|
||||
will-change: transform, box-shadow;
|
||||
}
|
||||
|
||||
.knotch {
|
||||
|
|
@ -125,20 +137,23 @@ button {
|
|||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
background: #111;
|
||||
box-shadow: 1px 2px 1px 1px #555;
|
||||
position: relative;
|
||||
top: 15%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
box-shadow: 1px 1px 1px #555;
|
||||
}
|
||||
|
||||
.grid {
|
||||
box-sizing: border-box;
|
||||
@media screen and (max-width: 900px) {
|
||||
.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;
|
||||
}
|
||||
|
||||
.grid-on {
|
||||
border: 1px solid #bbb;
|
||||
.knob {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.grid-off {
|
||||
border: none;
|
||||
}
|
||||
Loading…
Reference in a new issue