2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

rename classes from .bs-docs and .bs to .bd

This commit is contained in:
Mark Otto
2015-04-16 14:07:20 -07:00
parent 3c93681245
commit c84cf4f7f5
38 changed files with 386 additions and 371 deletions
+6 -6
View File
@@ -29,7 +29,7 @@ Bootstrap includes six predefined button styles, each serving its own semantic p
<button type="button" class="btn btn-link">Link</button>
{% endexample %}
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Conveying meaning to assistive technologies</h4>
<p>Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
</div>
@@ -45,12 +45,12 @@ Use the button classes on an `<a>`, `<button>`, or `<input>` element.
<input class="btn btn-secondary" type="submit" value="Submit">
{% endexample %}
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Links acting as buttons</h4>
<p>If the <code>&lt;a&gt;</code> elements are used to act as buttons triggering in-page functionality, rather than navigating to another document or section within the current page they should also be given an appropriate <code>role="button"</code>.</p>
</div>
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Cross-browser rendering</h4>
<p>As a best practice, <strong>we highly recommend using the <code>&lt;button&gt;</code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
</div>
@@ -106,17 +106,17 @@ As `<a>` elements don't support the `disabled` attribute, you must add the `.dis
<a href="#" class="btn btn-secondary btn-lg disabled" role="button">Link</a>
{% endexample %}
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Cross-browser compatibility</h4>
<p>If you add the <code>disabled</code> attribute to a <code>&lt;button&gt;</code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
</div>
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Link functionality caveat</h4>
<p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code>&lt;a&gt;</code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p>
</div>
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Context-specific usage</h4>
<p>While button classes can be used on <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements, only <code>&lt;button&gt;</code> elements are supported within our nav and navbar components.</p>
</div>
+12 -12
View File
@@ -33,7 +33,7 @@ Individual form controls automatically receive some global styling. All textual
</form>
{% endexample %}
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Don't mix form groups with input groups</h4>
<p>Do not mix form groups directly with <a href="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
</div>
@@ -42,11 +42,11 @@ Individual form controls automatically receive some global styling. All textual
Add `.form-inline` to your `<form>` 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.**
<div class="bs-callout bs-callout-danger">
<div class="bd-callout bd-callout-danger">
<h4>May require custom widths</h4>
<p>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.</p>
</div>
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Always add labels</h4>
<p>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.</p>
</div>
@@ -54,7 +54,7 @@ Add `.form-inline` to your `<form>` or a parent element for left-aligned and inl
### Visible labels
{% example html %}
<div class="bs-example" data-example-id="simple-form-inline">
<div class="bd-example" data-example-id="simple-form-inline">
<form class="form-inline">
<div class="form-group">
<label for="exampleInputName2">Name</label>
@@ -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`.
<div class="bs-callout bs-callout-danger">
<div class="bd-callout bd-callout-danger">
<h4>Type declaration required</h4>
<p>Inputs will only be fully styled if their `type` is properly declared.</p>
</div>
@@ -156,7 +156,7 @@ Most common form control, text-based input fields. Includes support for all HTML
<input type="text" class="form-control" placeholder="Text input">
{% endexample %}
<div class="bs-callout bs-callout-info">
<div class="bd-callout bd-callout-info">
<h4>Input groups</h4>
<p>To add integrated text or buttons before and/or after any text-based `&lt;input&gt;`, <a href="../components/#input-groups">check out the input group component</a>.</p>
</div>
@@ -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`.
<div class="bs-example">
<div class="bd-example">
<form>
<input class="form-control" id="focusedInput" type="text" value="Demonstrative focus state">
</form>
</div>
<div class="bs-callout bs-callout-info">
<div class="bd-callout bd-callout-info">
<h4>Demo `:focus` state</h4>
<p>The above example input uses custom styles in our documentation to demonstrate the `:focus` state on a `.form-control`.</p>
</div>
@@ -367,12 +367,12 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
</form>
{% endexample %}
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Caveat about link functionality of `&lt;a&gt;`</h4>
<p>By default, browsers will treat all native form controls (<code>&lt;input&gt;</code>, <code>&lt;select&gt;</code> and <code>&lt;button&gt;</code> elements) inside a <code>&lt;fieldset disabled&gt;</code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code>&lt;a ... class="btn btn-*"&gt;</code> elements, these will only be given a style of <code>pointer-events: none</code>. As noted in the section about <a href="#buttons-disabled">disabled state for buttons</a> (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.</p>
</div>
<div class="bs-callout bs-callout-danger">
<div class="bd-callout bd-callout-danger">
<h4>Cross-browser compatibility</h4>
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code>&lt;fieldset&gt;</code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
</div>
@@ -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.
<div class="bs-callout bs-callout-warning" id="callout-form-validation-state-accessibility">
<div class="bd-callout bd-callout-warning" id="callout-form-validation-state-accessibility">
<h4>Conveying validation state to assistive technologies and colorblind users</h4>
<p>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.</p>
<p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code>&lt;label&gt;</code> text itself (as is the case in the following code example), include a <a href="../components/#glyphicons">Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <a href="../components/#glyphicons-examples">Glyphicon examples</a>), or by providing an additional <a href="#forms-help-text">help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p>
@@ -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.
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Icons, labels, and input groups</h4>
<p>Manual positioning of feedback icons is required for inputs without a label and for <a href="../components#input-groups">input groups</a> 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.</p>
</div>
+6 -6
View File
@@ -9,7 +9,7 @@ Opt your images into responsive behavior (so they never become larger than their
Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element.
<div class="bs-example">
<div class="bd-example">
<img data-src="holder.js/100%x250" class="img-responsive" alt="Generic responsive image">
</div>
@@ -17,7 +17,7 @@ Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: a
<img src="..." class="img-responsive" alt="Responsive image">
{% endhighlight %}
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>SVG images and IE 9-10</h4>
<p>In Internet Explorer 9-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p>
</div>
@@ -26,7 +26,7 @@ Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: a
Add classes to an `<img>` element to easily style images in any project.
<div class="bs-example bs-example-images">
<div class="bd-example bd-example-images">
<img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners">
<img data-src="holder.js/200x200" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
<img data-src="holder.js/200x200" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
@@ -42,7 +42,7 @@ Add classes to an `<img>` element to easily style images in any project.
Align images with the [helper float classes](/components/helpers) or [text alignment classes](/components/helpers). A simple centering class can also be used for `block` level images.
<div class="bs-example bs-example-images">
<div class="bd-example bd-example-images">
<img data-src="holder.js/200x200" class="img-rounded pull-left" alt="A generic square placeholder image with rounded corners">
<img data-src="holder.js/200x200" class="img-rounded pull-right" alt="A generic square placeholder image with rounded corners">
</div>
@@ -52,7 +52,7 @@ Align images with the [helper float classes](/components/helpers) or [text align
<img src="..." class="img-rounded pull-right" alt="...">
{% endhighlight %}
<div class="bs-example bs-example-images">
<div class="bd-example bd-example-images">
<img data-src="holder.js/200x200" class="img-rounded center-block" style="display: block;" alt="A generic square placeholder image with rounded corners">
</div>
@@ -60,7 +60,7 @@ Align images with the [helper float classes](/components/helpers) or [text align
<img src="..." class="img-rounded center-block" style="display: block;" alt="...">
{% endhighlight %}
<div class="bs-example bs-example-images">
<div class="bd-example bd-example-images">
<div class="text-center">
<img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners">
</div>
+4 -4
View File
@@ -342,7 +342,7 @@ Use contextual classes to color table rows or individual cells.
</table>
</div>
<div class="bs-example">
<div class="bd-example">
<table class="table">
<thead>
<tr>
@@ -433,12 +433,12 @@ Use contextual classes to color table rows or individual cells.
Create responsive tables by wrapping any `.table` in `.table-responsive` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
<div class="bs-callout bs-callout-warning" id="callout-tables-responsive-overflow">
<div class="bd-callout bd-callout-warning" id="callout-tables-responsive-overflow">
<h4>Vertical clipping/truncation</h4>
<p>Responsive tables make use of <code>overflow-y: hidden</code>, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.</p>
</div>
<div class="bs-callout bs-callout-warning">
<div class="bd-callout bd-callout-warning">
<h4>Firefox and fieldsets</h4>
<p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p>
{% highlight css %}
@@ -449,7 +449,7 @@ Create responsive tables by wrapping any `.table` in `.table-responsive` to make
<p>For more information, read <a href="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p>
</div>
<div class="bs-example">
<div class="bd-example">
<div class="table-responsive">
<table class="table">
<thead>
+3 -3
View File
@@ -20,7 +20,7 @@ These styles can be found within `scaffolding.less`.
All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.
<div class="bs-example bs-example-type">
<div class="bd-example bd-example-type">
<table class="table">
<tbody>
<tr>
@@ -62,7 +62,7 @@ All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` cla
Create lighter, secondary text in any heading with a generic `<small>` tag or the `.small` class.
<div class="bs-example bs-example-type">
<div class="bd-example bd-example-type">
<table class="table">
<tbody>
<tr>
@@ -131,7 +131,7 @@ Styling for common inline HTML5 elements.
<p><em>This line rendered as italicized text.</em></p>
{% endexample %}
<div class="bs-callout bs-callout-info">
<div class="bd-callout bd-callout-info">
<h4>Alternate elements</h4>
<p>Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p>
</div>