aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/4.3/examples
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2020-03-31 20:02:57 +0200
committerGitHub <[email protected]>2020-03-31 20:02:57 +0200
commitdf707cd7272f9165dda895f08bdd15d093d96a25 (patch)
tree81c2effffc72b50164668054f2f0db7931bb02ab /site/content/docs/4.3/examples
parenta0c2a29a8dbb563fb84591522c6412063df70d59 (diff)
downloadbootstrap-df707cd7272f9165dda895f08bdd15d093d96a25.tar.xz
bootstrap-df707cd7272f9165dda895f08bdd15d093d96a25.zip
Require `.form-label` classes on form labels (#30476)
Diffstat (limited to 'site/content/docs/4.3/examples')
-rw-r--r--site/content/docs/4.3/examples/checkout/index.html26
-rw-r--r--site/content/docs/4.3/examples/floating-labels/floating-labels.css1
2 files changed, 13 insertions, 14 deletions
diff --git a/site/content/docs/4.3/examples/checkout/index.html b/site/content/docs/4.3/examples/checkout/index.html
index 94f89db72..82079d19a 100644
--- a/site/content/docs/4.3/examples/checkout/index.html
+++ b/site/content/docs/4.3/examples/checkout/index.html
@@ -68,7 +68,7 @@ body_class: "bg-light"
<form class="needs-validation" novalidate>
<div class="row g-3">
<div class="col-sm-6">
- <label for="firstName">First name</label>
+ <label for="firstName" class="form-label">First name</label>
<input type="text" class="form-control" id="firstName" placeholder="" value="" required>
<div class="invalid-feedback">
Valid first name is required.
@@ -76,7 +76,7 @@ body_class: "bg-light"
</div>
<div class="col-sm-6">
- <label for="lastName">Last name</label>
+ <label for="lastName" class="form-label">Last name</label>
<input type="text" class="form-control" id="lastName" placeholder="" value="" required>
<div class="invalid-feedback">
Valid last name is required.
@@ -84,7 +84,7 @@ body_class: "bg-light"
</div>
<div class="col-12">
- <label for="username">Username</label>
+ <label for="username" class="form-label">Username</label>
<div class="input-group">
<span class="input-group-text">@</span>
<input type="text" class="form-control" id="username" placeholder="Username" required>
@@ -95,7 +95,7 @@ body_class: "bg-light"
</div>
<div class="col-12">
- <label for="email">Email <span class="text-muted">(Optional)</span></label>
+ <label for="email" class="form-label">Email <span class="text-muted">(Optional)</span></label>
<input type="email" class="form-control" id="email" placeholder="[email protected]">
<div class="invalid-feedback">
Please enter a valid email address for shipping updates.
@@ -103,7 +103,7 @@ body_class: "bg-light"
</div>
<div class="col-12">
- <label for="address">Address</label>
+ <label for="address" class="form-label">Address</label>
<input type="text" class="form-control" id="address" placeholder="1234 Main St" required>
<div class="invalid-feedback">
Please enter your shipping address.
@@ -111,12 +111,12 @@ body_class: "bg-light"
</div>
<div class="col-12">
- <label for="address2">Address 2 <span class="text-muted">(Optional)</span></label>
+ <label for="address2" class="form-label">Address 2 <span class="text-muted">(Optional)</span></label>
<input type="text" class="form-control" id="address2" placeholder="Apartment or suite">
</div>
<div class="col-md-5">
- <label for="country">Country</label>
+ <label for="country" class="form-label">Country</label>
<select class="form-select" id="country" required>
<option value="">Choose...</option>
<option>United States</option>
@@ -127,7 +127,7 @@ body_class: "bg-light"
</div>
<div class="col-md-4">
- <label for="state">State</label>
+ <label for="state" class="form-label">State</label>
<select class="form-select" id="state" required>
<option value="">Choose...</option>
<option>California</option>
@@ -138,7 +138,7 @@ body_class: "bg-light"
</div>
<div class="col-md-3">
- <label for="zip">Zip</label>
+ <label for="zip" class="form-label">Zip</label>
<input type="text" class="form-control" id="zip" placeholder="" required>
<div class="invalid-feedback">
Zip code required.
@@ -179,7 +179,7 @@ body_class: "bg-light"
<div class="row gy-3">
<div class="col-md-6">
- <label for="cc-name">Name on card</label>
+ <label for="cc-name" class="form-label">Name on card</label>
<input type="text" class="form-control" id="cc-name" placeholder="" required>
<small class="text-muted">Full name as displayed on card</small>
<div class="invalid-feedback">
@@ -188,7 +188,7 @@ body_class: "bg-light"
</div>
<div class="col-md-6">
- <label for="cc-number">Credit card number</label>
+ <label for="cc-number" class="form-label">Credit card number</label>
<input type="text" class="form-control" id="cc-number" placeholder="" required>
<div class="invalid-feedback">
Credit card number is required
@@ -196,7 +196,7 @@ body_class: "bg-light"
</div>
<div class="col-md-3">
- <label for="cc-expiration">Expiration</label>
+ <label for="cc-expiration" class="form-label">Expiration</label>
<input type="text" class="form-control" id="cc-expiration" placeholder="" required>
<div class="invalid-feedback">
Expiration date required
@@ -204,7 +204,7 @@ body_class: "bg-light"
</div>
<div class="col-md-3">
- <label for="cc-cvv">CVV</label>
+ <label for="cc-cvv" class="form-label">CVV</label>
<input type="text" class="form-control" id="cc-cvv" placeholder="" required>
<div class="invalid-feedback">
Security code required
diff --git a/site/content/docs/4.3/examples/floating-labels/floating-labels.css b/site/content/docs/4.3/examples/floating-labels/floating-labels.css
index 163d21300..a9224c0d2 100644
--- a/site/content/docs/4.3/examples/floating-labels/floating-labels.css
+++ b/site/content/docs/4.3/examples/floating-labels/floating-labels.css
@@ -35,7 +35,6 @@ body {
left: 0;
display: block;
width: 100%;
- margin-bottom: 0; /* Override default `<label>` margin */
color: #495057;
pointer-events: none;
cursor: text; /* Match the input under the label */