Skip to content

Commit a769692

Browse files
feat: Keep every similar input in one div (#271)
* keep inputs in same div * update ui changes for box shadow page
1 parent d333a9c commit a769692

File tree

2 files changed

+91
-53
lines changed

2 files changed

+91
-53
lines changed

index.html

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -439,53 +439,57 @@ <h2>
439439
</label>
440440

441441
<div class="box-shadow-degrees">
442-
<label id="degree">
443-
<span>Horizontal offset</span>
444-
<input
445-
type="range"
446-
max="50"
447-
min="-20"
448-
value="5"
449-
id="box-shadow-h-offset"
450-
class="box-shodow-inputs"
451-
/>
452-
</label>
453-
454-
<label id="degree">
455-
<span>Vertical offset</span>
456-
<input
457-
type="range"
458-
max="50"
459-
min="-20"
460-
value="10"
461-
id="box-shadow-v-offset"
462-
class="box-shodow-inputs"
463-
/>
464-
</label>
442+
<div class="box-shadow-row">
443+
<label id="degree">
444+
<span>Horizontal</span>
445+
<input
446+
type="range"
447+
max="50"
448+
min="-20"
449+
value="5"
450+
id="box-shadow-h-offset"
451+
class="box-shodow-inputs"
452+
/>
453+
</label>
465454

466-
<label id="degree">
467-
<span>Blur</span>
468-
<input
469-
type="range"
470-
max="100"
471-
min="-20"
472-
value="18"
473-
id="box-shadow-blur"
474-
class="box-shodow-inputs"
475-
/>
476-
</label>
455+
<label id="degree">
456+
<span>Vertical</span>
457+
<input
458+
type="range"
459+
max="50"
460+
min="-20"
461+
value="10"
462+
id="box-shadow-v-offset"
463+
class="box-shodow-inputs"
464+
/>
465+
</label>
466+
</div>
467+
<hr class="divider" />
468+
<div class="box-shadow-row">
469+
<label id="degree">
470+
<span>Blur</span>
471+
<input
472+
type="range"
473+
max="100"
474+
min="-20"
475+
value="18"
476+
id="box-shadow-blur"
477+
class="box-shodow-inputs"
478+
/>
479+
</label>
477480

478-
<label id="degree">
479-
<span>Spread</span>
480-
<input
481-
type="range"
482-
max="50"
483-
min="-20"
484-
value="5"
485-
id="box-shadow-spread"
486-
class="box-shodow-inputs"
487-
/>
488-
</label>
481+
<label id="degree">
482+
<span>Spread</span>
483+
<input
484+
type="range"
485+
max="50"
486+
min="-20"
487+
value="5"
488+
id="box-shadow-spread"
489+
class="box-shodow-inputs"
490+
/>
491+
</label>
492+
</div>
489493
</div>
490494

491495
<div class="btn" data-button="box-shadow">Get Results</div>

src/style.css

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,29 +96,29 @@ nav ul > li span {
9696
margin-left: 0.2rem;
9797
}
9898

99-
nav ul > li span.tooltip{
99+
nav ul > li span.tooltip {
100100
position: absolute;
101-
right:-140px;
101+
right: -140px;
102102
padding: 5px;
103-
width:145px;
103+
width: 145px;
104104
color: var(--input-color);
105105
background-color: var(--text-color);
106106
border-radius: 5px;
107107
display: none;
108108
}
109109

110-
nav ul > li .tooltip::before{
111-
content: "";
110+
nav ul > li .tooltip::before {
111+
content: '';
112112
position: absolute;
113113
top: 50%;
114114
left: -8%;
115115
margin-top: -5px;
116116
border-width: 6px;
117117
border-style: solid;
118-
border-color: transparent var(--text-color) transparent transparent ;
118+
border-color: transparent var(--text-color) transparent transparent;
119119
}
120120

121-
nav ul > li:hover .tooltip{
121+
nav ul > li:hover .tooltip {
122122
display: block;
123123
}
124124

@@ -413,6 +413,28 @@ input[type='number']::-webkit-outer-spin-button {
413413
display: flex;
414414
flex-direction: column;
415415
align-items: center;
416+
margin-top: 2rem;
417+
/* background-color:#000000; */
418+
}
419+
420+
.box-shadow-row {
421+
width: 60%;
422+
display: flex;
423+
flex-direction: row;
424+
justify-content: center;
425+
align-items: center;
426+
background-color: var(--primary-color);
427+
}
428+
429+
.box-shadow-row label {
430+
width: 40% !important;
431+
}
432+
433+
.divider {
434+
width: 60%;
435+
border: none;
436+
height: 0.03rem;
437+
background-color: var(--text-color);
416438
}
417439

418440
/* Results */
@@ -627,7 +649,7 @@ a {
627649
--modal-width: calc(var(--modal-container-width) - 10vw);
628650
}
629651

630-
nav ul > li:hover .tooltip{
652+
nav ul > li:hover .tooltip {
631653
display: none;
632654
}
633655

@@ -644,6 +666,18 @@ a {
644666
:root {
645667
--output-width: 300px;
646668
}
669+
670+
.box-shadow-row {
671+
width: 80%;
672+
}
673+
674+
.box-shadow-row label {
675+
width: 50% !important;
676+
}
677+
678+
.divider {
679+
width: 80%;
680+
}
647681
}
648682

649683
@media screen and (max-width: 444px) {

0 commit comments

Comments
 (0)