Skip to content

Commit c50eae7

Browse files
committed
Refactor form controls: remove unnecessary icons from checkboxes and radios for a cleaner design, and adjust checkbox and radio input classes for improved spacing.
1 parent 9c9f256 commit c50eae7

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

src/html/pages/forms/form-controls.astro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ const formCheckboxesAndRadios = `<div class="row g-3">
338338
<input class="form-check-input mt-0" type="checkbox" id="inputGroupCheckbox">
339339
</div>
340340
<input type="text" class="form-control" placeholder="Checkbox with input">
341-
<span class="input-group-text"><i class="ri-checkbox-line"></i></span>
342341
</div>
343342
</div>
344343
<div class="col-md-6">
@@ -347,7 +346,6 @@ const formCheckboxesAndRadios = `<div class="row g-3">
347346
<input class="form-check-input mt-0" type="radio" id="inputGroupRadio">
348347
</div>
349348
<input type="text" class="form-control" placeholder="Radio with input">
350-
<span class="input-group-text"><i class="ri-radio-button-line"></i></span>
351349
</div>
352350
</div>
353351
</div>`;

src/html/pages/forms/radio-checkbox.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ const bootstrapBasicOptions = `<div class="row g-4">
233233
<div class="card mb-3">
234234
<div class="card-body">
235235
<div class="form-check">
236-
<input class="form-check-input" type="checkbox" id="discountOffer" checked>
236+
<input class="form-check-input me-2" type="checkbox" id="discountOffer" checked>
237237
<label class="form-check-label w-100" for="discountOffer">
238238
<div class="d-flex justify-content-between align-items-center">
239239
<div>
@@ -249,7 +249,7 @@ const bootstrapBasicOptions = `<div class="row g-4">
249249
<div class="card">
250250
<div class="card-body">
251251
<div class="form-check">
252-
<input class="form-check-input" type="checkbox" id="updateOffer">
252+
<input class="form-check-input me-2" type="checkbox" id="updateOffer">
253253
<label class="form-check-label w-100" for="updateOffer">
254254
<div class="d-flex justify-content-between align-items-center">
255255
<div>
@@ -269,7 +269,7 @@ const bootstrapBasicOptions = `<div class="row g-4">
269269
<div class="card mb-3">
270270
<div class="card-body">
271271
<div class="form-check">
272-
<input class="form-check-input" type="radio" name="pricingRadio" id="basicPlan" checked>
272+
<input class="form-check-input me-2" type="radio" name="pricingRadio" id="basicPlan" checked>
273273
<label class="form-check-label w-100" for="basicPlan">
274274
<div class="d-flex justify-content-between align-items-center">
275275
<div>
@@ -285,7 +285,7 @@ const bootstrapBasicOptions = `<div class="row g-4">
285285
<div class="card">
286286
<div class="card-body">
287287
<div class="form-check">
288-
<input class="form-check-input" type="radio" name="pricingRadio" id="premiumPlan">
288+
<input class="form-check-input me-2" type="radio" name="pricingRadio" id="premiumPlan">
289289
<label class="form-check-label w-100" for="premiumPlan">
290290
<div class="d-flex justify-content-between align-items-center">
291291
<div>

src/html/pages/forms/select.astro

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const basicSelectControls = `<div class="row g-3">
3232
</div>
3333
<div class="col-md-4">
3434
<div class="input-group">
35-
<span class="input-group-text"><i class="ri-service-line"></i></span>
3635
<select class="form-select rounded-pill">
3736
<option selected>Choose Service</option>
3837
<option value="web-dev">Web Development <i class="ri-code-line"></i></option>
@@ -353,7 +352,7 @@ const styledSelectControls = `<div class="row g-3">
353352
<!-- Basic Select Controls -->
354353
<div class="my-3">
355354
<h2 class="mb-0" id="basic-select">
356-
<i class="ri-list-settings-line me-2"></i>Basic Select Controls
355+
Basic Select Controls
357356
</h2>
358357
<p class="py-2">
359358
Enhanced select controls with intuitive visual feedback:
@@ -376,7 +375,7 @@ const styledSelectControls = `<div class="row g-3">
376375
<!-- Select Size Variations -->
377376
<div class="my-3">
378377
<h2 class="mb-0" id="select-sizing">
379-
<i class="ri-font-size-2 me-2"></i>Size Variations
378+
Size Variations
380379
</h2>
381380
<p class="py-2">
382381
Flexible sizing options to match your design needs:
@@ -399,7 +398,7 @@ const styledSelectControls = `<div class="row g-3">
399398
<!-- Multiple Selection -->
400399
<div class="my-3">
401400
<h2 class="mb-0" id="multiple-select">
402-
<i class="ri-checkbox-multiple-line me-2"></i>Multiple Selection
401+
Multiple Selection
403402
</h2>
404403
<p class="py-2">
405404
Various approaches for handling multiple selections:
@@ -425,7 +424,7 @@ const styledSelectControls = `<div class="row g-3">
425424
<!-- Grouped Options -->
426425
<div class="my-3">
427426
<h2 class="mb-0" id="grouped-options">
428-
<i class="ri-folder-line me-2"></i>Grouped Options
427+
Grouped Options
429428
</h2>
430429
<p class="py-2">
431430
Organize options into logical categories:
@@ -446,7 +445,7 @@ const styledSelectControls = `<div class="row g-3">
446445
<!-- Floating Labels -->
447446
<div class="my-3">
448447
<h2 class="mb-0" id="floating-labels">
449-
<i class="ri-price-tag-3-line me-2"></i>Floating Labels
448+
Floating Labels
450449
</h2>
451450
<p class="py-2">
452451
Modern form controls with animated labels:
@@ -468,7 +467,7 @@ const styledSelectControls = `<div class="row g-3">
468467
<!-- Styled Select -->
469468
<div class="my-3">
470469
<h2 class="mb-0" id="styled-select">
471-
<i class="ri-brush-line me-2"></i>Styled Select
470+
Styled Select
472471
</h2>
473472
<p class="py-2">
474473
Enhanced visual styles for select controls:

src/scss/components/forms/_form-control.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ $form-control-textarea-padding: 0.5rem !default;
2727
}
2828

2929
&:focus {
30-
margin: -1px; // Compensate for the increased border width
3130
border-color: var(--bs-primary);
32-
border-width: 2px;
3331
}
3432
}
3533

src/scss/components/forms/_form-select.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ $form-select-padding: 0.275rem 0.5rem !default;
2525
}
2626

2727
&:focus {
28-
margin: -1px; // Compensate for the increased border width
2928
border-color: var(--bs-primary);
30-
border-width: 2px;
3129
}
3230
}
3331

0 commit comments

Comments
 (0)