From c84cf4f7f5187e607e1c5a921d7a7b8166e66def Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 16 Apr 2015 14:07:20 -0700 Subject: rename classes from .bs-docs and .bs to .bd --- docs/content/forms.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'docs/content/forms.md') diff --git a/docs/content/forms.md b/docs/content/forms.md index ac056a8b9..313119f84 100644 --- a/docs/content/forms.md +++ b/docs/content/forms.md @@ -33,7 +33,7 @@ Individual form controls automatically receive some global styling. All textual {% endexample %} -
+

Don't mix form groups with input groups

Do not mix form groups directly with input groups. Instead, nest the input group inside of the form group.

@@ -42,11 +42,11 @@ Individual form controls automatically receive some global styling. All textual Add `.form-inline` to your `
` or a parent element for left-aligned and inline-block controls. **This only applies to form controls within viewports that are at least 768px wide.** -
+

May require custom widths

Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.

-
+

Always add labels

Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class.

@@ -54,7 +54,7 @@ Add `.form-inline` to your `` or a parent element for left-aligned and inl ### Visible labels {% example html %} -
+
@@ -147,7 +147,7 @@ Examples of standard form controls supported in an example form layout. Most common form control, text-based input fields. Includes support for all HTML5 types: `text`, `password`, `datetime`, `datetime-local`, `date`, `month`, `time`, `week`, `number`, `email`, `url`, `search`, `tel`, and `color`. -
+

Type declaration required

Inputs will only be fully styled if their `type` is properly declared.

@@ -156,7 +156,7 @@ Most common form control, text-based input fields. Includes support for all HTML {% endexample %} -
+

Input groups

To add integrated text or buttons before and/or after any text-based `<input>`, check out the input group component.

@@ -323,13 +323,13 @@ When you need to place plain text next to a form label within a form, use the `. We remove the default `outline` styles on some form controls and apply a `box-shadow` in its place for `:focus`. -
+
-
+

Demo `:focus` state

The above example input uses custom styles in our documentation to demonstrate the `:focus` state on a `.form-control`.

@@ -367,12 +367,12 @@ Add the `disabled` attribute to a `
` to disable all the controls withi {% endexample %} -
+

Caveat about link functionality of `<a>`

By default, browsers will treat all native form controls (<input>, <select> and <button> elements) inside a <fieldset disabled> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <a ... class="btn btn-*"> elements, these will only be given a style of pointer-events: none. As noted in the section about disabled state for buttons (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.

-
+

Cross-browser compatibility

While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the disabled attribute on a <fieldset>. Use custom JavaScript to disable the fieldset in these browsers.

@@ -389,7 +389,7 @@ Add the `readonly` boolean attribute on an input to prevent modification of the Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add `.has-warning`, `.has-error`, or `.has-success` to the parent element. Any `.control-label`, `.form-control`, and `.help-block` within that element will receive the validation styles. -
+

Conveying validation state to assistive technologies and colorblind users

Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.

Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <label> text itself (as is the case in the following code example), include a Glyphicon (with appropriate alternative text using the .sr-only class - see the Glyphicon examples), or by providing an additional help text block. Specifically for assistive technologies, invalid form controls can also be assigned an aria-invalid="true" attribute.

@@ -436,7 +436,7 @@ Bootstrap includes validation styles for error, warning, and success states on f You can also add optional feedback icons with the addition of `.has-feedback` and the right icon. -
+

Icons, labels, and input groups

Manual positioning of feedback icons is required for inputs without a label and for input groups with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the `sr-only` class. If you must do without labels, adjust the `top` value of the feedback icon. For input groups, adjust the `right` value to an appropriate pixel value depending on the width of your addon.

-- cgit v1.2.3 From 466d36e54175ee00927d6518d9481acd2d210590 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 16 Apr 2015 16:56:40 -0700 Subject: Redo all our callouts with the custom callout plugin - Replaces manual use of .bd-callout with {% callout [type] %} - Rearranged some callouts for proximity to others - Turned long lists of callouts--like those on tooltips, plugings, etc--into a list because holy shit that's overwhelming --- docs/content/forms.md | 93 +++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 48 deletions(-) (limited to 'docs/content/forms.md') diff --git a/docs/content/forms.md b/docs/content/forms.md index 313119f84..24f9b1a5b 100644 --- a/docs/content/forms.md +++ b/docs/content/forms.md @@ -9,6 +9,8 @@ Bootstrap normalizes common HTML5 form elements and adds a number of layout opti Individual form controls automatically receive some global styling. All textual ``, `