]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add support and docs for color input
authorMark Otto <markdotto@gmail.com>
Tue, 16 Jul 2019 22:16:15 +0000 (01:16 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 23 Aug 2019 23:26:28 +0000 (02:26 +0300)
scss/forms/_form-control.scss
site/content/docs/4.3/forms/form-control.md

index 817d8890c7623a6a8d4f4548605e29f3b199779b..ce6197840b76f9e4474f72085207142a5b8ae24d 100644 (file)
   line-height: $input-line-height-lg;
   @include border-radius($input-border-radius-lg);
 }
+
+.form-control-color {
+  max-width: 3rem;
+  padding: ($input-padding-y / 2) ($input-padding-x / 2);
+}
index c47940c1100cac01433283d186a05b7a17012617..92593e4f5d7edd9b96044b3382355185b1b7fedd 100644 (file)
@@ -73,3 +73,18 @@ If you want to have `<input readonly>` elements in your form styled as plain tex
   <button type="submit" class="btn btn-primary mb-3">Confirm identity</button>
 </form>
 {{< /example >}}
+
+## Color
+
+On macOS:
+
+- Chrome shows the native color picker
+- Safari shows a custom color picker that points to the input
+- Firefox shows the native color picker
+
+{{< example >}}
+<form>
+  <label for="exampleColorInput">Color picker</label>
+  <input type="color" class="form-control form-control-color" id="exampleColorInput" value="#563d7c">
+</form>
+{{< /example >}}