Fix how site looks in smaller windows

This commit is contained in:
lolabird 2023-11-12 14:18:58 -07:00
commit c1c8627475
2 changed files with 33 additions and 23 deletions

View file

@ -40,7 +40,7 @@
<h3 class="tool-labels">Grid Tools</h3> <h3 class="tool-labels">Grid Tools</h3>
<div class="grid-tools"> <div class="grid-tools">
<div class="slider"> <div class="slider">
<label for="gridSlider">Grid Size: <span id="sliderLabel"></span></label> <label class="tool-sub-labels" for="gridSlider">Grid Size: <span id="sliderLabel"></span></label>
<input name="gridSlider" id="gridSlider" type="range" min="1" max="100" value="16"> <input name="gridSlider" id="gridSlider" type="range" min="1" max="100" value="16">
<div class="knob-container"> <div class="knob-container">
<div class="knob" id="range-knob"> <div class="knob" id="range-knob">
@ -50,13 +50,16 @@
</div> </div>
</div> </div>
<div class="background-col-picker"> <div class="knobless-grid-tools">
<label class="color-label" for="back-col-picker">Canvas color:</label> <div class="background-col-picker">
<input class="color-input" type="color" id="back-col-picker" value="#ff0000"> <label class="tool-sub-labels" for="back-col-picker">Canvas color:</label>
<input class="color-input" type="color" id="back-col-picker" value="#ff0000">
</div>
<div class="grid-buttons">
<button id="gridToggle">Grid</button>
<button id="reset">Reset</button>
</div>
</div> </div>
<button id="gridToggle">Grid</button>
<button id="reset">Reset</button>
</div> </div>
</div> </div>
</main> </main>

View file

@ -29,14 +29,14 @@ main {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-wrap: wrap;
flex: 1; flex: 1;
} }
h3 {
}
footer { footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%; width: 100%;
background-color: #111; background-color: #111;
opacity: .8; opacity: .8;
@ -67,7 +67,7 @@ button, .container, .color-input {
padding: 0 10px; padding: 0 10px;
} }
.color-label { .tool-sub-labels {
padding-bottom: 5px; padding-bottom: 5px;
font-size: 18px; font-size: 18px;
} }
@ -75,7 +75,6 @@ button, .container, .color-input {
.color-input { .color-input {
width: 120%; width: 120%;
height: 25px; height: 25px;
} }
button { button {
@ -163,7 +162,21 @@ button {
box-shadow: 1px 1px 1px #555; box-shadow: 1px 1px 1px #555;
} }
.knobless-grid-tools {
display: flex;
flex-direction: column;
}
.grid-buttons {
display: flex;
flex-direction: column;
}
@media screen and (max-width: 900px) { @media screen and (max-width: 900px) {
main {
flex-direction: column;
}
.pen-color, .pen-tools, .grid-tools { .pen-color, .pen-tools, .grid-tools {
flex-direction: row; /* Switch to a row layout when wrapping occurs */ flex-direction: row; /* Switch to a row layout when wrapping occurs */
align-items: flex-end; align-items: flex-end;
@ -171,15 +184,9 @@ button {
flex-wrap: wrap; flex-wrap: wrap;
} }
.knob { .tool-sub-labels {
width: 50px; display: flex;
height: 50px; flex-direction: column;
} }
}
.knob-shadow {
width: 50px;
height: 50px;
top: 8%;
left: 1%;
}
}