mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-26 19:44:07 +03:00
bs4 docs sync
This commit is contained in:
parent
283ae05c07
commit
2faec6e72b
|
@ -5,7 +5,7 @@ module Jekyll
|
||||||
"Bootstrap" => "https://github.com/twbs/bootstrap/issues/",
|
"Bootstrap" => "https://github.com/twbs/bootstrap/issues/",
|
||||||
"IE" => ["https://connect.microsoft.com/IE/feedback/details/", "IE bug"],
|
"IE" => ["https://connect.microsoft.com/IE/feedback/details/", "IE bug"],
|
||||||
"Mozilla" => ["https://bugzilla.mozilla.org/show_bug.cgi?id=", "Mozilla bug"],
|
"Mozilla" => ["https://bugzilla.mozilla.org/show_bug.cgi?id=", "Mozilla bug"],
|
||||||
"Chromium" => ["https://code.google.com/p/chromium/issues/detail?id=", "Chromium issue"],
|
"Chromium" => ["https://bugs.chromium.org/p/chromium/issues/detail?id=", "Chromium issue"],
|
||||||
"WebKit" => ["https://bugs.webkit.org/show_bug.cgi?id=", "WebKit bug"],
|
"WebKit" => ["https://bugs.webkit.org/show_bug.cgi?id=", "WebKit bug"],
|
||||||
"Safari" => ["https://openradar.appspot.com/", "Apple Safari Radar"],
|
"Safari" => ["https://openradar.appspot.com/", "Apple Safari Radar"],
|
||||||
"Normalize" => ["https://github.com/necolas/normalize.css/issues/", "Normalize"]
|
"Normalize" => ["https://github.com/necolas/normalize.css/issues/", "Normalize"]
|
||||||
|
|
8
docs/assets/js/vendor/anchor.min.js
vendored
8
docs/assets/js/vendor/anchor.min.js
vendored
File diff suppressed because one or more lines are too long
4
docs/assets/js/vendor/clipboard.min.js
vendored
4
docs/assets/js/vendor/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
7
docs/assets/js/vendor/holder.min.js
vendored
7
docs/assets/js/vendor/holder.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/vendor/jekyll-search.min.js
vendored
2
docs/assets/js/vendor/jekyll-search.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -71,7 +71,7 @@ Alerts can also contain additional HTML elements like headings and paragraphs.
|
||||||
<div class="alert alert-success" role="alert">
|
<div class="alert alert-success" role="alert">
|
||||||
<h4 class="alert-heading">Well done!</h4>
|
<h4 class="alert-heading">Well done!</h4>
|
||||||
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
|
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
|
||||||
<p class="m-b-0">Whenever you need to, be sure to use a margin utilities to keep things nice and tidy.</p>
|
<p class="m-b-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
|
||||||
</div>
|
</div>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,6 @@ You can optionally use `<button>` elements in your dropdowns instead of `<a>`s.
|
||||||
</div>
|
</div>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Alignment
|
## Alignment
|
||||||
|
|
||||||
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
|
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
|
||||||
|
@ -66,11 +64,18 @@ By default, a dropdown menu is automatically positioned 100% from the top and al
|
||||||
**Heads up!** Dropdowns are positioned only with CSS and may need some additional styles for exact alignment.
|
**Heads up!** Dropdowns are positioned only with CSS and may need some additional styles for exact alignment.
|
||||||
{% endcallout %}
|
{% endcallout %}
|
||||||
|
|
||||||
{% highlight html %}
|
{% example html %}
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dLabel">
|
<div class="btn-group">
|
||||||
...
|
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
This dropdown's menu is right-aligned
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
<button class="dropdown-item" type="button">Action</button>
|
||||||
|
<button class="dropdown-item" type="button">Another action</button>
|
||||||
|
<button class="dropdown-item" type="button">Something else here</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endhighlight %}
|
{% endexample %}
|
||||||
|
|
||||||
## Menu headers
|
## Menu headers
|
||||||
|
|
||||||
|
|
|
@ -30,16 +30,16 @@ Remember, since Bootstrap utilizes the HTML5 doctype, **all inputs must have a `
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<form>
|
<form>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputEmail1">Email address</label>
|
<label for="exampleInputEmail1">Email address</label>
|
||||||
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
|
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
|
||||||
<small id="emailHelp" class="text-muted">We'll never share your email with anyone else.</small>
|
<small id="emailHelp" class="text-muted">We'll never share your email with anyone else.</small>
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputPassword1">Password</label>
|
<label for="exampleInputPassword1">Password</label>
|
||||||
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleSelect1">Example select</label>
|
<label for="exampleSelect1">Example select</label>
|
||||||
<select class="form-control" id="exampleSelect1">
|
<select class="form-control" id="exampleSelect1">
|
||||||
<option>1</option>
|
<option>1</option>
|
||||||
|
@ -48,8 +48,8 @@ Remember, since Bootstrap utilizes the HTML5 doctype, **all inputs must have a `
|
||||||
<option>4</option>
|
<option>4</option>
|
||||||
<option>5</option>
|
<option>5</option>
|
||||||
</select>
|
</select>
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleSelect2">Example multiple select</label>
|
<label for="exampleSelect2">Example multiple select</label>
|
||||||
<select multiple class="form-control" id="exampleSelect2">
|
<select multiple class="form-control" id="exampleSelect2">
|
||||||
<option>1</option>
|
<option>1</option>
|
||||||
|
@ -58,34 +58,37 @@ Remember, since Bootstrap utilizes the HTML5 doctype, **all inputs must have a `
|
||||||
<option>4</option>
|
<option>4</option>
|
||||||
<option>5</option>
|
<option>5</option>
|
||||||
</select>
|
</select>
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleTextarea">Example textarea</label>
|
<label for="exampleTextarea">Example textarea</label>
|
||||||
<textarea class="form-control" id="exampleTextarea" rows="3"></textarea>
|
<textarea class="form-control" id="exampleTextarea" rows="3"></textarea>
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputFile">File input</label>
|
<label for="exampleInputFile">File input</label>
|
||||||
<input type="file" class="form-control-file" id="exampleInputFile" aria-describedby="fileHelp">
|
<input type="file" class="form-control-file" id="exampleInputFile" aria-describedby="fileHelp">
|
||||||
<small id="fileHelp" class="text-muted">This is some placeholder block-level help text for the above input. It's a bit lighter and easily wraps to a new line.</small>
|
<small id="fileHelp" class="text-muted">This is some placeholder block-level help text for the above input. It's a bit lighter and easily wraps to a new line.</small>
|
||||||
|
</div>
|
||||||
|
<fieldset class="form-group">
|
||||||
|
<legend>Radio buttons</legend>
|
||||||
|
<div class="radio">
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
|
||||||
|
Option one is this and that—be sure to include why it's great
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
||||||
|
Option two can be something else and selecting it will deselect option one
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="radio disabled">
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
|
||||||
|
Option three is disabled
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="radio">
|
|
||||||
<label>
|
|
||||||
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
|
|
||||||
Option one is this and that—be sure to include why it's great
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="radio">
|
|
||||||
<label>
|
|
||||||
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
|
||||||
Option two can be something else and selecting it will deselect option one
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="radio disabled">
|
|
||||||
<label>
|
|
||||||
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
|
|
||||||
Option three is disabled
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox"> Check me out
|
<input type="checkbox"> Check me out
|
||||||
|
@ -269,14 +272,14 @@ The `.form-group` class is the easiest way to add some structure to forms. Its o
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<form>
|
<form>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="formGroupExampleInput">Example label</label>
|
<label for="formGroupExampleInput">Example label</label>
|
||||||
<input type="text" class="form-control" id="formGroupExampleInput" placeholder="Example input">
|
<input type="text" class="form-control" id="formGroupExampleInput" placeholder="Example input">
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset class="form-group">
|
<div class="form-group">
|
||||||
<label for="formGroupExampleInput2">Another label</label>
|
<label for="formGroupExampleInput2">Another label</label>
|
||||||
<input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input">
|
<input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input">
|
||||||
</fieldset>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
@ -341,11 +344,16 @@ Because of this, you may need to manually address the width and alignment of ind
|
||||||
</form>
|
</form>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
{% callout warning %}
|
||||||
|
#### Alternatives to hidden labels
|
||||||
|
Assistive technologies such as 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. There are further alternative methods of providing a label for assistive technologies, such as the `aria-label`, `aria-labelledby` or `title` attribute. If none of these are present, assistive technologies may resort to using the `placeholder` attribute, if present, but note that use of `placeholder` as a replacement for other labelling methods is not advised.
|
||||||
|
{% endcallout %}
|
||||||
|
|
||||||
### Using the Grid
|
### Using the Grid
|
||||||
|
|
||||||
For more structured form layouts, you can utilize Bootstrap's predefined grid classes (or mixins) to create horizontal forms. Add the `.row` class to form groups and use the `.col-*-*` classes to specify the width of your labels and controls.
|
For more structured form layouts, you can utilize Bootstrap's predefined grid classes (or mixins) to create horizontal forms. Add the `.row` class to form groups and use the `.col-*-*` classes to specify the width of your labels and controls.
|
||||||
|
|
||||||
Be sure to add `.form-control-label` to your `<label>`s as well so they're vertically centered with their associated labels.
|
Be sure to add `.form-control-label` to your `<label>`s as well so they're vertically centered with their associated form controls. For `<legend>` elements, you can use `.form-control-legend` to make them appear similar to regular `<label>` elements.
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<form>
|
<form>
|
||||||
|
@ -361,8 +369,8 @@ Be sure to add `.form-control-label` to your `<label>`s as well so they're verti
|
||||||
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
|
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<fieldset class="form-group row">
|
||||||
<label class="col-sm-2">Radios</label>
|
<legend class="col-sm-2 form-control-legend">Radios</legend>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
|
@ -383,9 +391,9 @@ Be sure to add `.form-control-label` to your `<label>`s as well so they're verti
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</fieldset>
|
||||||
<div class="form-group row">
|
<fieldset class="form-group row">
|
||||||
<label class="col-sm-2">Checkbox</label>
|
<legend class="col-sm-2 form-control-legend">Checkbox</legend>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
|
@ -393,7 +401,7 @@ Be sure to add `.form-control-label` to your `<label>`s as well so they're verti
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</fieldset>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-offset-2 col-sm-10">
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
<button type="submit" class="btn btn-secondary">Sign in</button>
|
<button type="submit" class="btn btn-secondary">Sign in</button>
|
||||||
|
@ -474,17 +482,17 @@ Use the `.checkbox-inline` or `.radio-inline` classes on a series of checkboxes
|
||||||
|
|
||||||
### Without labels
|
### Without labels
|
||||||
|
|
||||||
Should you have no text within the `<label>`, the input is positioned as you'd expect. **Currently only works on non-inline checkboxes and radios.**
|
Should you have no text within the `<label>`, the input is positioned as you'd expect. **Currently only works on non-inline checkboxes and radios.** Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="blankCheckbox" value="option1">
|
<input type="checkbox" id="blankCheckbox" value="option1" aria-label="...">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="blankRadio" id="blankRadio1" value="option1">
|
<input type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="...">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
|
@ -25,7 +25,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
|
||||||
The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.
|
The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.
|
||||||
|
|
||||||
<div class="bd-example">
|
<div class="bd-example">
|
||||||
<nav id="navbar-example2" class="navbar navbar-default" role="navigation">
|
<nav id="navbar-example2" class="navbar navbar-default">
|
||||||
<h3 class="navbar-brand">Project Name</h3>
|
<h3 class="navbar-brand">Project Name</h3>
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<li class="nav-item"><a class="nav-link" href="#fat">@fat</a></li>
|
<li class="nav-item"><a class="nav-link" href="#fat">@fat</a></li>
|
||||||
|
|
|
@ -50,6 +50,8 @@ Where *size* is one of:
|
||||||
* `2` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 1.5` or `$spacer-y * 1.5`
|
* `2` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 1.5` or `$spacer-y * 1.5`
|
||||||
* `3` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 3` or `$spacer-y * 3`
|
* `3` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 3` or `$spacer-y * 3`
|
||||||
|
|
||||||
|
(You can add more sizes by adding entries to the `$spacers` Sass map variable.)
|
||||||
|
|
||||||
Here are some representative examples of these classes:
|
Here are some representative examples of these classes:
|
||||||
|
|
||||||
{% highlight scss %}
|
{% highlight scss %}
|
||||||
|
@ -238,6 +240,20 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes
|
||||||
}
|
}
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
## Fixed positioning
|
||||||
|
|
||||||
|
The `.pos-f-t` class can be used to easily position elements at the top of the viewport and make them as wide as the viewport. **Be sure you understand the ramifications of fixed-position elements within your project.** Here's how the class is defined:
|
||||||
|
|
||||||
|
{% highlight scss %}
|
||||||
|
.pos-f-t {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: $zindex-navbar-fixed;
|
||||||
|
}
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
## Invisible content
|
## Invisible content
|
||||||
|
|
||||||
The `.invisible` class can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document.
|
The `.invisible` class can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user