Skip to content

Commit 288e879

Browse files
feat: modify input radius in gradient border (#513)
Co-authored-by: Dunsin <[email protected]>
1 parent 8d73ffd commit 288e879

File tree

2 files changed

+47
-16
lines changed

2 files changed

+47
-16
lines changed

index.html

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -583,19 +583,28 @@ <h1>Gradient Border</h1>
583583
<div class="preview" id="gradient-border-color-preview"></div>
584584

585585
<label class="radius" for="gradient-border-radius">
586-
<input type="checkbox" id="gradient-border-radius" name="check" />
587-
<span> Include Radius </span>
588-
<label id="radius-input-label" for="gradient-border-input">
589-
<input
590-
type="number"
591-
id="gradient-border-input"
592-
name="desired-radius"
593-
placeholder="Enter a number e.g. 50"
594-
class="toggle-radius"
595-
autofocus
596-
required
597-
/>
598-
</label>
586+
<div class="radius-input-container">
587+
<div class="radius-checkbox-container">
588+
<input
589+
class="circular-checkbox"
590+
type="checkbox"
591+
id="gradient-border-radius"
592+
name="check"
593+
/>
594+
<span> Include Radius </span>
595+
</div>
596+
<label id="radius-input-label" for="gradient-border-input">
597+
<input
598+
type="number"
599+
id="gradient-border-input"
600+
name="desired-radius"
601+
placeholder="Enter a number e.g. 50"
602+
class="toggle-radius styled-input"
603+
autofocus
604+
required
605+
/>
606+
</label>
607+
</div>
599608
</label>
600609

601610
<label id="degree">

src/style.css

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,21 @@ input::placeholder {
569569
left: 0;
570570
}
571571

572-
#animation-duration,
572+
#animation-duration {
573+
background: #0e213c;
574+
border: 1px solid black;
575+
border-radius: 5px;
576+
-webkit-text-fill-color: white;
577+
padding: 4px;
578+
font-family: inherit;
579+
}
580+
573581
#gradient-border-input {
574-
border: 2px solid #2196f3;
582+
background: white;
583+
border: 1px solid black;
575584
border-radius: 5px;
585+
-webkit-text-fill-color: black;
576586
padding: 4px;
577-
margin-top: 8px;
578587
font-family: inherit;
579588
}
580589

@@ -934,6 +943,19 @@ input[type='number']::-webkit-outer-spin-button {
934943
width: 100%;
935944
}
936945

946+
.radius-checkbox-container {
947+
display: flex;
948+
align-items: center;
949+
gap: 10px;
950+
}
951+
952+
.radius-input-container {
953+
display: flex;
954+
align-items: center;
955+
justify-content: space-between;
956+
width: 100%;
957+
}
958+
937959
#border-radius-code {
938960
/* padding: 1rem; */
939961
background: var(--primary-color);

0 commit comments

Comments
 (0)