style-guide 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/.pairs +11 -0
- data/.rvmrc +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +144 -0
- data/Guardfile +14 -0
- data/LICENSE +7 -0
- data/README.md +7 -0
- data/Rakefile +27 -0
- data/app/assets/images/style_guide/.gitkeep +0 -0
- data/app/assets/images/style_guide/img/bird.png +0 -0
- data/app/assets/images/style_guide/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
- data/app/assets/images/style_guide/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
- data/app/assets/images/style_guide/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
- data/app/assets/images/style_guide/img/browsers.png +0 -0
- data/app/assets/images/style_guide/img/bs-docs-bootstrap-features.png +0 -0
- data/app/assets/images/style_guide/img/bs-docs-masthead-pattern.png +0 -0
- data/app/assets/images/style_guide/img/bs-docs-responsive-illustrations.png +0 -0
- data/app/assets/images/style_guide/img/bs-docs-twitter-github.png +0 -0
- data/app/assets/images/style_guide/img/example-diagram-01.png +0 -0
- data/app/assets/images/style_guide/img/example-diagram-02.png +0 -0
- data/app/assets/images/style_guide/img/example-diagram-03.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/8020select.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/adoptahydrant.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/bartop.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/breakingnews.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/fleetio.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/gathercontent.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/jshint.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/kippt.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/railwayjs.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/soundready.png +0 -0
- data/app/assets/images/style_guide/img/example-sites/totalwireframe.png +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-carousel.png +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-fluid.jpg +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-hero.jpg +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-marketing-narrow.png +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-signin.png +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-starter.jpg +0 -0
- data/app/assets/images/style_guide/img/examples/bootstrap-example-sticky-footer.png +0 -0
- data/app/assets/images/style_guide/img/examples/browser-icon-chrome.png +0 -0
- data/app/assets/images/style_guide/img/examples/browser-icon-firefox.png +0 -0
- data/app/assets/images/style_guide/img/examples/browser-icon-safari.png +0 -0
- data/app/assets/images/style_guide/img/examples/slide-01.jpg +0 -0
- data/app/assets/images/style_guide/img/examples/slide-02.jpg +0 -0
- data/app/assets/images/style_guide/img/examples/slide-03.jpg +0 -0
- data/app/assets/images/style_guide/img/github-16px.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_009_magic.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_042_group.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_079_podium.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_082_roundabout.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_163_iphone.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_214_resize_small.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons/glyphicons_266_book_open.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/style_guide/img/glyphicons-halflings.png +0 -0
- data/app/assets/images/style_guide/img/grid-18px-masked.png +0 -0
- data/app/assets/images/style_guide/img/grid-baseline-20px.png +0 -0
- data/app/assets/images/style_guide/img/icon-css3.png +0 -0
- data/app/assets/images/style_guide/img/icon-github.png +0 -0
- data/app/assets/images/style_guide/img/icon-html5.png +0 -0
- data/app/assets/images/style_guide/img/icon-twitter.png +0 -0
- data/app/assets/images/style_guide/img/less-logo-large.png +0 -0
- data/app/assets/images/style_guide/img/less-small.png +0 -0
- data/app/assets/images/style_guide/img/responsive-illustrations.png +0 -0
- data/app/assets/javascripts/style_guide/application.js +13 -0
- data/app/assets/javascripts/style_guide/docs.js +154 -0
- data/app/assets/javascripts/style_guide/prettify.js +28 -0
- data/app/assets/stylesheets/style_guide/application.css +13 -0
- data/app/assets/stylesheets/style_guide/docs.css +1015 -0
- data/app/assets/stylesheets/style_guide/prettify.css +30 -0
- data/app/controllers/style_guide/application_controller.rb +4 -0
- data/app/controllers/style_guide/style_controller.rb +12 -0
- data/app/helpers/style_guide/application_helper.rb +4 -0
- data/app/views/layouts/style_guide/application.html.erb +44 -0
- data/app/views/style_guide/partials/_buttons.erb +167 -0
- data/app/views/style_guide/partials/_code.erb +31 -0
- data/app/views/style_guide/partials/_forms.erb +714 -0
- data/app/views/style_guide/partials/_images.erb +318 -0
- data/app/views/style_guide/partials/_tables.erb +409 -0
- data/app/views/style_guide/partials/_typography.erb +331 -0
- data/app/views/style_guide/style/index.html.erb +32 -0
- data/config/routes.rb +3 -0
- data/lib/style_guide/engine.rb +12 -0
- data/lib/style_guide/version.rb +3 -0
- data/lib/style_guide.rb +4 -0
- data/script/rails +8 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_009_magic.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_042_group.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_079_podium.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_082_roundabout.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_163_iphone.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_214_resize_small.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons/glyphicons_266_book_open.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons-halflings-white.png +0 -0
- data/spec/dummy/app/assets/images/img/glyphicons-halflings.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +27 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-affix.js +106 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-alert.js +88 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-button.js +94 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-carousel.js +176 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-collapse.js +156 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-dropdown.js +148 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-modal.js +234 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-popover.js +103 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-scrollspy.js +151 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-tab.js +133 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-tooltip.js +276 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-transition.js +60 -0
- data/spec/dummy/app/assets/javascripts/bootstrap-typeahead.js +310 -0
- data/spec/dummy/app/assets/javascripts/jquery.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/accordion.less +34 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/alerts.less +65 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/bootstrap.less +63 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/breadcrumbs.less +24 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/button-groups.less +242 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/buttons.less +232 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/carousel.less +131 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/close.less +31 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/code.less +58 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/component-animations.less +22 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/dropdowns.less +237 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/forms.less +683 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/grid.less +21 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/hero-unit.less +25 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/labels-badges.less +74 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/layouts.less +16 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/media.less +55 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/mixins.less +687 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/modals.less +94 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/navbar.less +475 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/navs.less +385 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/pager.less +41 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/pagination.less +121 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/popovers.less +117 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/progress-bars.less +122 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/reset.less +138 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/responsive-1200px-min.less +28 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/responsive-767px-max.less +193 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/responsive-768px-979px.less +19 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/responsive-navbar.less +185 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/responsive-utilities.less +43 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/responsive.less +48 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/scaffolding.less +52 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/sprites.less +193 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/tables.less +236 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/thumbnails.less +52 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/tooltip.less +70 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/type.less +227 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/utilities.less +30 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/variables.less +301 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap/wells.less +29 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap-responsive.css +1088 -0
- data/spec/dummy/app/assets/stylesheets/bootstrap.css +5893 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap/_colors.scss +10 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap/ars-maquette-web.css +35 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap/button.less +5 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap/layout.css.scss +11 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap/typography.css.scss +20 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap/variables.css.less +10 -0
- data/spec/dummy/app/assets/stylesheets/pivotal-bootstrap.css.less +3 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/styles/_info-header.erb +1 -0
- data/spec/dummy/config/application.rb +32 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +34 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_009_magic.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_042_group.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_079_podium.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_082_roundabout.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_163_iphone.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_214_resize_small.png +0 -0
- data/spec/dummy/public/img/glyphicons/glyphicons_266_book_open.png +0 -0
- data/spec/dummy/public/img/glyphicons-halflings-white.png +0 -0
- data/spec/dummy/public/img/glyphicons-halflings.png +0 -0
- data/spec/dummy/script/rails +6 -0
- data/style-guide.gemspec +26 -0
- metadata +500 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
.com { color: #93a1a1; }
|
2
|
+
.lit { color: #195f91; }
|
3
|
+
.pun, .opn, .clo { color: #93a1a1; }
|
4
|
+
.fun { color: #dc322f; }
|
5
|
+
.str, .atv { color: #D14; }
|
6
|
+
.kwd, .prettyprint .tag { color: #1e347b; }
|
7
|
+
.typ, .atn, .dec, .var { color: teal; }
|
8
|
+
.pln { color: #48484c; }
|
9
|
+
|
10
|
+
.prettyprint {
|
11
|
+
padding: 8px;
|
12
|
+
background-color: #f7f7f9;
|
13
|
+
border: 1px solid #e1e1e8;
|
14
|
+
}
|
15
|
+
.prettyprint.linenums {
|
16
|
+
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
17
|
+
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
18
|
+
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Specify class=linenums on a pre to get line numbering */
|
22
|
+
ol.linenums {
|
23
|
+
margin: 0 0 0 33px; /* IE indents via margin-left */
|
24
|
+
}
|
25
|
+
ol.linenums li {
|
26
|
+
padding-left: 12px;
|
27
|
+
color: #bebec5;
|
28
|
+
line-height: 20px;
|
29
|
+
text-shadow: 0 1px 0 #fff;
|
30
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module StyleGuide
|
2
|
+
class StyleController < StyleGuide::ApplicationController
|
3
|
+
def index
|
4
|
+
@partials = []
|
5
|
+
StyleGuide::Engine.config.style_guide.partial_paths.each do |path|
|
6
|
+
Dir.glob(File.expand_path("_*.erb", path)) do |partial|
|
7
|
+
@partials << partial
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>StyleGuide</title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta name="description" content="">
|
8
|
+
<meta name="author" content="">
|
9
|
+
|
10
|
+
<%= stylesheet_link_tag "application", :media => "all" %>
|
11
|
+
<%= stylesheet_link_tag "style_guide/application", :media => "all" %>
|
12
|
+
<%= csrf_meta_tags %>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body data-spy="scroll" data-target=".bs-docs-sidebar">
|
16
|
+
|
17
|
+
<!-- Navbar
|
18
|
+
================================================== -->
|
19
|
+
<div class="navbar navbar-inverse navbar-fixed-top">
|
20
|
+
<div class="navbar-inner">
|
21
|
+
<div class="container">
|
22
|
+
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
23
|
+
<span class="icon-bar"></span>
|
24
|
+
<span class="icon-bar"></span>
|
25
|
+
<span class="icon-bar"></span>
|
26
|
+
</button>
|
27
|
+
<a class="brand" href="/">Bootstrap</a>
|
28
|
+
<div class="nav-collapse collapse">
|
29
|
+
<ul class="nav">
|
30
|
+
<li class="index active">
|
31
|
+
<a href="/style-guide">Base CSS</a>
|
32
|
+
</li>
|
33
|
+
</ul>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<%= yield %>
|
40
|
+
|
41
|
+
<%= javascript_include_tag "application" %>
|
42
|
+
<%= javascript_include_tag "style_guide/application" %>
|
43
|
+
</body>
|
44
|
+
</html>
|
@@ -0,0 +1,167 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
<!-- Buttons
|
5
|
+
================================================== -->
|
6
|
+
<section id="buttons">
|
7
|
+
<div class="page-header">
|
8
|
+
<h1>Buttons</h1>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<h2>Default buttons</h2>
|
12
|
+
<p>Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code><a></code> and <code><button></code> elements for the best rendering.</p>
|
13
|
+
<table class="table table-bordered table-striped">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th>Button</th>
|
17
|
+
<th>class=""</th>
|
18
|
+
<th>Description</th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<td><button type="button" class="btn">Default</button></td>
|
24
|
+
<td><code>btn</code></td>
|
25
|
+
<td>Standard gray button with gradient</td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td><button type="button" class="btn btn-primary">Primary</button></td>
|
29
|
+
<td><code>btn btn-primary</code></td>
|
30
|
+
<td>Provides extra visual weight and identifies the primary action in a set of buttons</td>
|
31
|
+
</tr>
|
32
|
+
<tr>
|
33
|
+
<td><button type="button" class="btn btn-info">Info</button></td>
|
34
|
+
<td><code>btn btn-info</code></td>
|
35
|
+
<td>Used as an alternative to the default styles</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td><button type="button" class="btn btn-success">Success</button></td>
|
39
|
+
<td><code>btn btn-success</code></td>
|
40
|
+
<td>Indicates a successful or positive action</td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td><button type="button" class="btn btn-warning">Warning</button></td>
|
44
|
+
<td><code>btn btn-warning</code></td>
|
45
|
+
<td>Indicates caution should be taken with this action</td>
|
46
|
+
</tr>
|
47
|
+
<tr>
|
48
|
+
<td><button type="button" class="btn btn-danger">Danger</button></td>
|
49
|
+
<td><code>btn btn-danger</code></td>
|
50
|
+
<td>Indicates a dangerous or potentially negative action</td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<td><button type="button" class="btn btn-inverse">Inverse</button></td>
|
54
|
+
<td><code>btn btn-inverse</code></td>
|
55
|
+
<td>Alternate dark gray button, not tied to a semantic action or use</td>
|
56
|
+
</tr>
|
57
|
+
<tr>
|
58
|
+
<td><button type="button" class="btn btn-link">Link</button></td>
|
59
|
+
<td><code>btn btn-link</code></td>
|
60
|
+
<td>Deemphasize a button by making it look like a link while maintaining button behavior</td>
|
61
|
+
</tr>
|
62
|
+
</tbody>
|
63
|
+
</table>
|
64
|
+
|
65
|
+
<h4>Cross browser compatibility</h4>
|
66
|
+
<p>IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled <code>button</code> elements, rendering text gray with a nasty text-shadow that we cannot fix.</p>
|
67
|
+
|
68
|
+
|
69
|
+
<h2>Button sizes</h2>
|
70
|
+
<p>Fancy larger or smaller buttons? Add <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code> for additional sizes.</p>
|
71
|
+
<div class="bs-docs-example">
|
72
|
+
<p>
|
73
|
+
<button type="button" class="btn btn-large btn-primary">Large button</button>
|
74
|
+
<button type="button" class="btn btn-large">Large button</button>
|
75
|
+
</p>
|
76
|
+
<p>
|
77
|
+
<button type="button" class="btn btn-primary">Default button</button>
|
78
|
+
<button type="button" class="btn">Default button</button>
|
79
|
+
</p>
|
80
|
+
<p>
|
81
|
+
<button type="button" class="btn btn-small btn-primary">Small button</button>
|
82
|
+
<button type="button" class="btn btn-small">Small button</button>
|
83
|
+
</p>
|
84
|
+
<p>
|
85
|
+
<button type="button" class="btn btn-mini btn-primary">Mini button</button>
|
86
|
+
<button type="button" class="btn btn-mini">Mini button</button>
|
87
|
+
</p>
|
88
|
+
</div>
|
89
|
+
<pre class="prettyprint linenums">
|
90
|
+
<p>
|
91
|
+
<button class="btn btn-large btn-primary" type="button">Large button</button>
|
92
|
+
<button class="btn btn-large" type="button">Large button</button>
|
93
|
+
</p>
|
94
|
+
<p>
|
95
|
+
<button class="btn btn-primary" type="button">Default button</button>
|
96
|
+
<button class="btn" type="button">Default button</button>
|
97
|
+
</p>
|
98
|
+
<p>
|
99
|
+
<button class="btn btn-small btn-primary" type="button">Small button</button>
|
100
|
+
<button class="btn btn-small" type="button">Small button</button>
|
101
|
+
</p>
|
102
|
+
<p>
|
103
|
+
<button class="btn btn-mini btn-primary" type="button">Mini button</button>
|
104
|
+
<button class="btn btn-mini" type="button">Mini button</button>
|
105
|
+
</p>
|
106
|
+
</pre>
|
107
|
+
<p>Create block level buttons—those that span the full width of a parent— by adding <code>.btn-block</code>.</p>
|
108
|
+
<div class="bs-docs-example">
|
109
|
+
<div class="well" style="max-width: 400px; margin: 0 auto 10px;">
|
110
|
+
<button type="button" class="btn btn-large btn-block btn-primary">Block level button</button>
|
111
|
+
<button type="button" class="btn btn-large btn-block">Block level button</button>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
<pre class="prettyprint linenums">
|
115
|
+
<button class="btn btn-large btn-block btn-primary" type="button">Block level button</button>
|
116
|
+
<button class="btn btn-large btn-block" type="button">Block level button</button>
|
117
|
+
</pre>
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Disabled state</h2>
|
121
|
+
<p>Make buttons look unclickable by fading them back 50%.</p>
|
122
|
+
|
123
|
+
<h3>Anchor element</h3>
|
124
|
+
<p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p>
|
125
|
+
<p class="bs-docs-example">
|
126
|
+
<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>
|
127
|
+
<a href="#" class="btn btn-large disabled">Link</a>
|
128
|
+
</p>
|
129
|
+
<pre class="prettyprint linenums">
|
130
|
+
<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>
|
131
|
+
<a href="#" class="btn btn-large disabled">Link</a>
|
132
|
+
</pre>
|
133
|
+
<p>
|
134
|
+
<span class="label label-info">Heads up!</span>
|
135
|
+
We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here.
|
136
|
+
</p>
|
137
|
+
|
138
|
+
<h3>Button element</h3>
|
139
|
+
<p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p>
|
140
|
+
<p class="bs-docs-example">
|
141
|
+
<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button>
|
142
|
+
<button type="button" class="btn btn-large" disabled>Button</button>
|
143
|
+
</p>
|
144
|
+
<pre class="prettyprint linenums">
|
145
|
+
<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button>
|
146
|
+
<button type="button" class="btn btn-large" disabled>Button</button>
|
147
|
+
</pre>
|
148
|
+
|
149
|
+
|
150
|
+
<h2>One class, multiple tags</h2>
|
151
|
+
<p>Use the <code>.btn</code> class on an <code><a></code>, <code><button></code>, or <code><input></code> element.</p>
|
152
|
+
<form class="bs-docs-example">
|
153
|
+
<a class="btn" href="">Link</a>
|
154
|
+
<button class="btn" type="submit">Button</button>
|
155
|
+
<input class="btn" type="button" value="Input">
|
156
|
+
<input class="btn" type="submit" value="Submit">
|
157
|
+
</form>
|
158
|
+
<pre class="prettyprint linenums">
|
159
|
+
<a class="btn" href="">Link</a>
|
160
|
+
<button class="btn" type="submit">Button</button>
|
161
|
+
<input class="btn" type="button" value="Input">
|
162
|
+
<input class="btn" type="submit" value="Submit">
|
163
|
+
</pre>
|
164
|
+
<p>As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an <code>input</code>, use an <code><input type="submit"></code> for your button.</p>
|
165
|
+
|
166
|
+
</section>
|
167
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
<!-- Code
|
4
|
+
================================================== -->
|
5
|
+
<section id="code">
|
6
|
+
<div class="page-header">
|
7
|
+
<h1>Code</h1>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<h2>Inline</h2>
|
11
|
+
<p>Wrap inline snippets of code with <code><code></code>.</p>
|
12
|
+
<div class="bs-docs-example">
|
13
|
+
For example, <code><section></code> should be wrapped as inline.
|
14
|
+
</div>
|
15
|
+
<pre class="prettyprint linenums">
|
16
|
+
For example, <code><section></code> should be wrapped as inline.
|
17
|
+
</pre>
|
18
|
+
|
19
|
+
<h2>Basic block</h2>
|
20
|
+
<p>Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p>
|
21
|
+
<div class="bs-docs-example">
|
22
|
+
<pre><p>Sample text here...</p></pre>
|
23
|
+
</div>
|
24
|
+
<pre class="prettyprint linenums" style="margin-bottom: 9px;">
|
25
|
+
<pre>
|
26
|
+
&lt;p&gt;Sample text here...&lt;/p&gt;
|
27
|
+
</pre>
|
28
|
+
</pre>
|
29
|
+
<p><span class="label label-info">Heads up!</span> Be sure to keep code within <code><pre></code> tags as close to the left as possible; it will render all tabs.</p>
|
30
|
+
<p>You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and provide a y-axis scrollbar.</p>
|
31
|
+
</section>
|
@@ -0,0 +1,714 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
<!-- Forms
|
5
|
+
================================================== -->
|
6
|
+
<section id="forms">
|
7
|
+
<div class="page-header">
|
8
|
+
<h1>Forms</h1>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<h2>Default styles</h2>
|
12
|
+
<p>Individual form controls receive styling, but without any required base class on the <code><form></code> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.</p>
|
13
|
+
<form class="bs-docs-example">
|
14
|
+
<fieldset>
|
15
|
+
<legend>Legend</legend>
|
16
|
+
<label>Label name</label>
|
17
|
+
<input type="text" placeholder="Type something…">
|
18
|
+
<span class="help-block">Example block-level help text here.</span>
|
19
|
+
<label class="checkbox">
|
20
|
+
<input type="checkbox"> Check me out
|
21
|
+
</label>
|
22
|
+
<button type="submit" class="btn">Submit</button>
|
23
|
+
</fieldset>
|
24
|
+
</form>
|
25
|
+
<pre class="prettyprint linenums">
|
26
|
+
<form>
|
27
|
+
<fieldset>
|
28
|
+
<legend>Legend</legend>
|
29
|
+
<label>Label name</label>
|
30
|
+
<input type="text" placeholder="Type something…">
|
31
|
+
<span class="help-block">Example block-level help text here.</span>
|
32
|
+
<label class="checkbox">
|
33
|
+
<input type="checkbox"> Check me out
|
34
|
+
</label>
|
35
|
+
<button type="submit" class="btn">Submit</button>
|
36
|
+
</fieldset>
|
37
|
+
</form>
|
38
|
+
</pre>
|
39
|
+
|
40
|
+
|
41
|
+
<hr class="bs-docs-separator">
|
42
|
+
|
43
|
+
|
44
|
+
<h2>Optional layouts</h2>
|
45
|
+
<p>Included with Bootstrap are three optional form layouts for common use cases.</p>
|
46
|
+
|
47
|
+
<h3>Search form</h3>
|
48
|
+
<p>Add <code>.form-search</code> to the form and <code>.search-query</code> to the <code><input></code> for an extra-rounded text input.</p>
|
49
|
+
<form class="bs-docs-example form-search">
|
50
|
+
<input type="text" class="input-medium search-query">
|
51
|
+
<button type="submit" class="btn">Search</button>
|
52
|
+
</form>
|
53
|
+
<pre class="prettyprint linenums">
|
54
|
+
<form class="form-search">
|
55
|
+
<input type="text" class="input-medium search-query">
|
56
|
+
<button type="submit" class="btn">Search</button>
|
57
|
+
</form>
|
58
|
+
</pre>
|
59
|
+
|
60
|
+
<h3>Inline form</h3>
|
61
|
+
<p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p>
|
62
|
+
<form class="bs-docs-example form-inline">
|
63
|
+
<input type="text" class="input-small" placeholder="Email">
|
64
|
+
<input type="password" class="input-small" placeholder="Password">
|
65
|
+
<label class="checkbox">
|
66
|
+
<input type="checkbox"> Remember me
|
67
|
+
</label>
|
68
|
+
<button type="submit" class="btn">Sign in</button>
|
69
|
+
</form>
|
70
|
+
<pre class="prettyprint linenums">
|
71
|
+
<form class="form-inline">
|
72
|
+
<input type="text" class="input-small" placeholder="Email">
|
73
|
+
<input type="password" class="input-small" placeholder="Password">
|
74
|
+
<label class="checkbox">
|
75
|
+
<input type="checkbox"> Remember me
|
76
|
+
</label>
|
77
|
+
<button type="submit" class="btn">Sign in</button>
|
78
|
+
</form>
|
79
|
+
</pre>
|
80
|
+
|
81
|
+
<h3>Horizontal form</h3>
|
82
|
+
<p>Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:</p>
|
83
|
+
<ul>
|
84
|
+
<li>Add <code>.form-horizontal</code> to the form</li>
|
85
|
+
<li>Wrap labels and controls in <code>.control-group</code></li>
|
86
|
+
<li>Add <code>.control-label</code> to the label</li>
|
87
|
+
<li>Wrap any associated controls in <code>.controls</code> for proper alignment</li>
|
88
|
+
</ul>
|
89
|
+
<form class="bs-docs-example form-horizontal">
|
90
|
+
<div class="control-group">
|
91
|
+
<label class="control-label" for="inputEmail">Email</label>
|
92
|
+
<div class="controls">
|
93
|
+
<input type="text" id="inputEmail" placeholder="Email">
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="control-group">
|
97
|
+
<label class="control-label" for="inputPassword">Password</label>
|
98
|
+
<div class="controls">
|
99
|
+
<input type="password" id="inputPassword" placeholder="Password">
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
<div class="control-group">
|
103
|
+
<div class="controls">
|
104
|
+
<label class="checkbox">
|
105
|
+
<input type="checkbox"> Remember me
|
106
|
+
</label>
|
107
|
+
<button type="submit" class="btn">Sign in</button>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
</form>
|
111
|
+
<pre class="prettyprint linenums">
|
112
|
+
<form class="form-horizontal">
|
113
|
+
<div class="control-group">
|
114
|
+
<label class="control-label" for="inputEmail">Email</label>
|
115
|
+
<div class="controls">
|
116
|
+
<input type="text" id="inputEmail" placeholder="Email">
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
<div class="control-group">
|
120
|
+
<label class="control-label" for="inputPassword">Password</label>
|
121
|
+
<div class="controls">
|
122
|
+
<input type="password" id="inputPassword" placeholder="Password">
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
<div class="control-group">
|
126
|
+
<div class="controls">
|
127
|
+
<label class="checkbox">
|
128
|
+
<input type="checkbox"> Remember me
|
129
|
+
</label>
|
130
|
+
<button type="submit" class="btn">Sign in</button>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
</form>
|
134
|
+
</pre>
|
135
|
+
|
136
|
+
|
137
|
+
<hr class="bs-docs-separator">
|
138
|
+
|
139
|
+
|
140
|
+
<h2>Supported form controls</h2>
|
141
|
+
<p>Examples of standard form controls supported in an example form layout.</p>
|
142
|
+
|
143
|
+
<h3>Inputs</h3>
|
144
|
+
<p>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.</p>
|
145
|
+
<p>Requires the use of a specified <code>type</code> at all times.</p>
|
146
|
+
<form class="bs-docs-example form-inline">
|
147
|
+
<input type="text" placeholder="Text input">
|
148
|
+
</form>
|
149
|
+
<pre class="prettyprint linenums">
|
150
|
+
<input type="text" placeholder="Text input">
|
151
|
+
</pre>
|
152
|
+
|
153
|
+
<h3>Textarea</h3>
|
154
|
+
<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
|
155
|
+
<form class="bs-docs-example form-inline">
|
156
|
+
<textarea rows="3"></textarea>
|
157
|
+
</form>
|
158
|
+
<pre class="prettyprint linenums">
|
159
|
+
<textarea rows="3"></textarea>
|
160
|
+
</pre>
|
161
|
+
|
162
|
+
<h3>Checkboxes and radios</h3>
|
163
|
+
<p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p>
|
164
|
+
<h4>Default (stacked)</h4>
|
165
|
+
<form class="bs-docs-example">
|
166
|
+
<label class="checkbox">
|
167
|
+
<input type="checkbox" value="">
|
168
|
+
Option one is this and that—be sure to include why it's great
|
169
|
+
</label>
|
170
|
+
<br>
|
171
|
+
<label class="radio">
|
172
|
+
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
|
173
|
+
Option one is this and that—be sure to include why it's great
|
174
|
+
</label>
|
175
|
+
<label class="radio">
|
176
|
+
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
177
|
+
Option two can be something else and selecting it will deselect option one
|
178
|
+
</label>
|
179
|
+
</form>
|
180
|
+
<pre class="prettyprint linenums">
|
181
|
+
<label class="checkbox">
|
182
|
+
<input type="checkbox" value="">
|
183
|
+
Option one is this and that—be sure to include why it's great
|
184
|
+
</label>
|
185
|
+
|
186
|
+
<label class="radio">
|
187
|
+
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
|
188
|
+
Option one is this and that—be sure to include why it's great
|
189
|
+
</label>
|
190
|
+
<label class="radio">
|
191
|
+
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
|
192
|
+
Option two can be something else and selecting it will deselect option one
|
193
|
+
</label>
|
194
|
+
</pre>
|
195
|
+
|
196
|
+
<h4>Inline checkboxes</h4>
|
197
|
+
<p>Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p>
|
198
|
+
<form class="bs-docs-example">
|
199
|
+
<label class="checkbox inline">
|
200
|
+
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
|
201
|
+
</label>
|
202
|
+
<label class="checkbox inline">
|
203
|
+
<input type="checkbox" id="inlineCheckbox2" value="option2"> 2
|
204
|
+
</label>
|
205
|
+
<label class="checkbox inline">
|
206
|
+
<input type="checkbox" id="inlineCheckbox3" value="option3"> 3
|
207
|
+
</label>
|
208
|
+
</form>
|
209
|
+
<pre class="prettyprint linenums">
|
210
|
+
<label class="checkbox inline">
|
211
|
+
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
|
212
|
+
</label>
|
213
|
+
<label class="checkbox inline">
|
214
|
+
<input type="checkbox" id="inlineCheckbox2" value="option2"> 2
|
215
|
+
</label>
|
216
|
+
<label class="checkbox inline">
|
217
|
+
<input type="checkbox" id="inlineCheckbox3" value="option3"> 3
|
218
|
+
</label>
|
219
|
+
</pre>
|
220
|
+
|
221
|
+
<h3>Selects</h3>
|
222
|
+
<p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p>
|
223
|
+
<form class="bs-docs-example">
|
224
|
+
<select>
|
225
|
+
<option>1</option>
|
226
|
+
<option>2</option>
|
227
|
+
<option>3</option>
|
228
|
+
<option>4</option>
|
229
|
+
<option>5</option>
|
230
|
+
</select>
|
231
|
+
<br>
|
232
|
+
<select multiple="multiple">
|
233
|
+
<option>1</option>
|
234
|
+
<option>2</option>
|
235
|
+
<option>3</option>
|
236
|
+
<option>4</option>
|
237
|
+
<option>5</option>
|
238
|
+
</select>
|
239
|
+
</form>
|
240
|
+
<pre class="prettyprint linenums">
|
241
|
+
<select>
|
242
|
+
<option>1</option>
|
243
|
+
<option>2</option>
|
244
|
+
<option>3</option>
|
245
|
+
<option>4</option>
|
246
|
+
<option>5</option>
|
247
|
+
</select>
|
248
|
+
|
249
|
+
<select multiple="multiple">
|
250
|
+
<option>1</option>
|
251
|
+
<option>2</option>
|
252
|
+
<option>3</option>
|
253
|
+
<option>4</option>
|
254
|
+
<option>5</option>
|
255
|
+
</select>
|
256
|
+
</pre>
|
257
|
+
|
258
|
+
|
259
|
+
<hr class="bs-docs-separator">
|
260
|
+
|
261
|
+
|
262
|
+
<h2>Extending form controls</h2>
|
263
|
+
<p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p>
|
264
|
+
|
265
|
+
<h3>Prepended and appended inputs</h3>
|
266
|
+
<p>Add text or buttons before or after any text-based input. Do note that <code>select</code> elements are not supported here.</p>
|
267
|
+
|
268
|
+
<h4>Default options</h4>
|
269
|
+
<p>Wrap an <code>.add-on</code> and an <code>input</code> with one of two classes to prepend or append text to an input.</p>
|
270
|
+
<form class="bs-docs-example">
|
271
|
+
<div class="input-prepend">
|
272
|
+
<span class="add-on">@</span>
|
273
|
+
<input class="span2" id="prependedInput" type="text" placeholder="Username">
|
274
|
+
</div>
|
275
|
+
<br>
|
276
|
+
<div class="input-append">
|
277
|
+
<input class="span2" id="appendedInput" type="text">
|
278
|
+
<span class="add-on">.00</span>
|
279
|
+
</div>
|
280
|
+
</form>
|
281
|
+
<pre class="prettyprint linenums">
|
282
|
+
<div class="input-prepend">
|
283
|
+
<span class="add-on">@</span>
|
284
|
+
<input class="span2" id="prependedInput" type="text" placeholder="Username">
|
285
|
+
</div>
|
286
|
+
<div class="input-append">
|
287
|
+
<input class="span2" id="appendedInput" type="text">
|
288
|
+
<span class="add-on">.00</span>
|
289
|
+
</div>
|
290
|
+
</pre>
|
291
|
+
|
292
|
+
<h4>Combined</h4>
|
293
|
+
<p>Use both classes and two instances of <code>.add-on</code> to prepend and append an input.</p>
|
294
|
+
<form class="bs-docs-example form-inline">
|
295
|
+
<div class="input-prepend input-append">
|
296
|
+
<span class="add-on">$</span>
|
297
|
+
<input class="span2" id="appendedPrependedInput" type="text">
|
298
|
+
<span class="add-on">.00</span>
|
299
|
+
</div>
|
300
|
+
</form>
|
301
|
+
<pre class="prettyprint linenums">
|
302
|
+
<div class="input-prepend input-append">
|
303
|
+
<span class="add-on">$</span>
|
304
|
+
<input class="span2" id="appendedPrependedInput" type="text">
|
305
|
+
<span class="add-on">.00</span>
|
306
|
+
</div>
|
307
|
+
</pre>
|
308
|
+
|
309
|
+
<h4>Buttons instead of text</h4>
|
310
|
+
<p>Instead of a <code><span></code> with text, use a <code>.btn</code> to attach a button (or two) to an input.</p>
|
311
|
+
<form class="bs-docs-example">
|
312
|
+
<div class="input-append">
|
313
|
+
<input class="span2" id="appendedInputButton" type="text">
|
314
|
+
<button class="btn" type="button">Go!</button>
|
315
|
+
</div>
|
316
|
+
</form>
|
317
|
+
<pre class="prettyprint linenums">
|
318
|
+
<div class="input-append">
|
319
|
+
<input class="span2" id="appendedInputButton" type="text">
|
320
|
+
<button class="btn" type="button">Go!</button>
|
321
|
+
</div>
|
322
|
+
</pre>
|
323
|
+
<form class="bs-docs-example">
|
324
|
+
<div class="input-append">
|
325
|
+
<input class="span2" id="appendedInputButtons" type="text">
|
326
|
+
<button class="btn" type="button">Search</button>
|
327
|
+
<button class="btn" type="button">Options</button>
|
328
|
+
</div>
|
329
|
+
</form>
|
330
|
+
<pre class="prettyprint linenums">
|
331
|
+
<div class="input-append">
|
332
|
+
<input class="span2" id="appendedInputButtons" type="text">
|
333
|
+
<button class="btn" type="button">Search</button>
|
334
|
+
<button class="btn" type="button">Options</button>
|
335
|
+
</div>
|
336
|
+
</pre>
|
337
|
+
|
338
|
+
<h4>Button dropdowns</h4>
|
339
|
+
<p></p>
|
340
|
+
<form class="bs-docs-example">
|
341
|
+
<div class="input-append">
|
342
|
+
<input class="span2" id="appendedDropdownButton" type="text">
|
343
|
+
<div class="btn-group">
|
344
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
345
|
+
<ul class="dropdown-menu">
|
346
|
+
<li><a href="#">Action</a></li>
|
347
|
+
<li><a href="#">Another action</a></li>
|
348
|
+
<li><a href="#">Something else here</a></li>
|
349
|
+
<li class="divider"></li>
|
350
|
+
<li><a href="#">Separated link</a></li>
|
351
|
+
</ul>
|
352
|
+
</div><!-- /btn-group -->
|
353
|
+
</div><!-- /input-append -->
|
354
|
+
</form>
|
355
|
+
<pre class="prettyprint linenums">
|
356
|
+
<div class="input-append">
|
357
|
+
<input class="span2" id="appendedDropdownButton" type="text">
|
358
|
+
<div class="btn-group">
|
359
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
360
|
+
Action
|
361
|
+
<span class="caret"></span>
|
362
|
+
</button>
|
363
|
+
<ul class="dropdown-menu">
|
364
|
+
...
|
365
|
+
</ul>
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
</pre>
|
369
|
+
|
370
|
+
<form class="bs-docs-example">
|
371
|
+
<div class="input-prepend">
|
372
|
+
<div class="btn-group">
|
373
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
374
|
+
<ul class="dropdown-menu">
|
375
|
+
<li><a href="#">Action</a></li>
|
376
|
+
<li><a href="#">Another action</a></li>
|
377
|
+
<li><a href="#">Something else here</a></li>
|
378
|
+
<li class="divider"></li>
|
379
|
+
<li><a href="#">Separated link</a></li>
|
380
|
+
</ul>
|
381
|
+
</div><!-- /btn-group -->
|
382
|
+
<input class="span2" id="prependedDropdownButton" type="text">
|
383
|
+
</div><!-- /input-prepend -->
|
384
|
+
</form>
|
385
|
+
<pre class="prettyprint linenums">
|
386
|
+
<div class="input-prepend">
|
387
|
+
<div class="btn-group">
|
388
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
389
|
+
Action
|
390
|
+
<span class="caret"></span>
|
391
|
+
</button>
|
392
|
+
<ul class="dropdown-menu">
|
393
|
+
...
|
394
|
+
</ul>
|
395
|
+
</div>
|
396
|
+
<input class="span2" id="prependedDropdownButton" type="text">
|
397
|
+
</div>
|
398
|
+
</pre>
|
399
|
+
|
400
|
+
<form class="bs-docs-example">
|
401
|
+
<div class="input-prepend input-append">
|
402
|
+
<div class="btn-group">
|
403
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
404
|
+
<ul class="dropdown-menu">
|
405
|
+
<li><a href="#">Action</a></li>
|
406
|
+
<li><a href="#">Another action</a></li>
|
407
|
+
<li><a href="#">Something else here</a></li>
|
408
|
+
<li class="divider"></li>
|
409
|
+
<li><a href="#">Separated link</a></li>
|
410
|
+
</ul>
|
411
|
+
</div><!-- /btn-group -->
|
412
|
+
<input class="span2" id="appendedPrependedDropdownButton" type="text">
|
413
|
+
<div class="btn-group">
|
414
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
415
|
+
<ul class="dropdown-menu">
|
416
|
+
<li><a href="#">Action</a></li>
|
417
|
+
<li><a href="#">Another action</a></li>
|
418
|
+
<li><a href="#">Something else here</a></li>
|
419
|
+
<li class="divider"></li>
|
420
|
+
<li><a href="#">Separated link</a></li>
|
421
|
+
</ul>
|
422
|
+
</div><!-- /btn-group -->
|
423
|
+
</div><!-- /input-prepend input-append -->
|
424
|
+
</form>
|
425
|
+
<pre class="prettyprint linenums">
|
426
|
+
<div class="input-prepend input-append">
|
427
|
+
<div class="btn-group">
|
428
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
429
|
+
Action
|
430
|
+
<span class="caret"></span>
|
431
|
+
</button>
|
432
|
+
<ul class="dropdown-menu">
|
433
|
+
...
|
434
|
+
</ul>
|
435
|
+
</div>
|
436
|
+
<input class="span2" id="appendedPrependedDropdownButton" type="text">
|
437
|
+
<div class="btn-group">
|
438
|
+
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
439
|
+
Action
|
440
|
+
<span class="caret"></span>
|
441
|
+
</button>
|
442
|
+
<ul class="dropdown-menu">
|
443
|
+
...
|
444
|
+
</ul>
|
445
|
+
</div>
|
446
|
+
</div>
|
447
|
+
</pre>
|
448
|
+
|
449
|
+
<h4>Search form</h4>
|
450
|
+
<form class="bs-docs-example form-search">
|
451
|
+
<div class="input-append">
|
452
|
+
<input type="text" class="span2 search-query">
|
453
|
+
<button type="submit" class="btn">Search</button>
|
454
|
+
</div>
|
455
|
+
<div class="input-prepend">
|
456
|
+
<button type="submit" class="btn">Search</button>
|
457
|
+
<input type="text" class="span2 search-query">
|
458
|
+
</div>
|
459
|
+
</form>
|
460
|
+
<pre class="prettyprint linenums">
|
461
|
+
<form class="form-search">
|
462
|
+
<div class="input-append">
|
463
|
+
<input type="text" class="span2 search-query">
|
464
|
+
<button type="submit" class="btn">Search</button>
|
465
|
+
</div>
|
466
|
+
<div class="input-prepend">
|
467
|
+
<button type="submit" class="btn">Search</button>
|
468
|
+
<input type="text" class="span2 search-query">
|
469
|
+
</div>
|
470
|
+
</form>
|
471
|
+
</pre>
|
472
|
+
|
473
|
+
<h3>Control sizing</h3>
|
474
|
+
<p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.</p>
|
475
|
+
|
476
|
+
<h4>Block level inputs</h4>
|
477
|
+
<p>Make any <code><input></code> or <code><textarea></code> element behave like a block level element.</p>
|
478
|
+
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
479
|
+
<div class="controls">
|
480
|
+
<input class="input-block-level" type="text" placeholder=".input-block-level">
|
481
|
+
</div>
|
482
|
+
</form>
|
483
|
+
<pre class="prettyprint linenums">
|
484
|
+
<input class="input-block-level" type="text" placeholder=".input-block-level">
|
485
|
+
</pre>
|
486
|
+
|
487
|
+
<h4>Relative sizing</h4>
|
488
|
+
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
489
|
+
<div class="controls docs-input-sizes">
|
490
|
+
<input class="input-mini" type="text" placeholder=".input-mini">
|
491
|
+
<input class="input-small" type="text" placeholder=".input-small">
|
492
|
+
<input class="input-medium" type="text" placeholder=".input-medium">
|
493
|
+
<input class="input-large" type="text" placeholder=".input-large">
|
494
|
+
<input class="input-xlarge" type="text" placeholder=".input-xlarge">
|
495
|
+
<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
|
496
|
+
</div>
|
497
|
+
</form>
|
498
|
+
<pre class="prettyprint linenums">
|
499
|
+
<input class="input-mini" type="text" placeholder=".input-mini">
|
500
|
+
<input class="input-small" type="text" placeholder=".input-small">
|
501
|
+
<input class="input-medium" type="text" placeholder=".input-medium">
|
502
|
+
<input class="input-large" type="text" placeholder=".input-large">
|
503
|
+
<input class="input-xlarge" type="text" placeholder=".input-xlarge">
|
504
|
+
<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
|
505
|
+
</pre>
|
506
|
+
<p>
|
507
|
+
<span class="label label-info">Heads up!</span> In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, <code>.input-large</code> will increase the padding and font-size of an input.
|
508
|
+
</p>
|
509
|
+
|
510
|
+
<h4>Grid sizing</h4>
|
511
|
+
<p>Use <code>.span1</code> to <code>.span12</code> for inputs that match the same sizes of the grid columns.</p>
|
512
|
+
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
513
|
+
<div class="controls docs-input-sizes">
|
514
|
+
<input class="span1" type="text" placeholder=".span1">
|
515
|
+
<input class="span2" type="text" placeholder=".span2">
|
516
|
+
<input class="span3" type="text" placeholder=".span3">
|
517
|
+
<select class="span1">
|
518
|
+
<option>1</option>
|
519
|
+
<option>2</option>
|
520
|
+
<option>3</option>
|
521
|
+
<option>4</option>
|
522
|
+
<option>5</option>
|
523
|
+
</select>
|
524
|
+
<select class="span2">
|
525
|
+
<option>1</option>
|
526
|
+
<option>2</option>
|
527
|
+
<option>3</option>
|
528
|
+
<option>4</option>
|
529
|
+
<option>5</option>
|
530
|
+
</select>
|
531
|
+
<select class="span3">
|
532
|
+
<option>1</option>
|
533
|
+
<option>2</option>
|
534
|
+
<option>3</option>
|
535
|
+
<option>4</option>
|
536
|
+
<option>5</option>
|
537
|
+
</select>
|
538
|
+
</div>
|
539
|
+
</form>
|
540
|
+
<pre class="prettyprint linenums">
|
541
|
+
<input class="span1" type="text" placeholder=".span1">
|
542
|
+
<input class="span2" type="text" placeholder=".span2">
|
543
|
+
<input class="span3" type="text" placeholder=".span3">
|
544
|
+
<select class="span1">
|
545
|
+
...
|
546
|
+
</select>
|
547
|
+
<select class="span2">
|
548
|
+
...
|
549
|
+
</select>
|
550
|
+
<select class="span3">
|
551
|
+
...
|
552
|
+
</select>
|
553
|
+
</pre>
|
554
|
+
|
555
|
+
<p>For multiple grid inputs per line, <strong>use the <code>.controls-row</code> modifier class for proper spacing</strong>. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.</p>
|
556
|
+
<form class="bs-docs-example" style="padding-bottom: 15px;">
|
557
|
+
<div class="controls">
|
558
|
+
<input class="span5" type="text" placeholder=".span5">
|
559
|
+
</div>
|
560
|
+
<div class="controls controls-row">
|
561
|
+
<input class="span4" type="text" placeholder=".span4">
|
562
|
+
<input class="span1" type="text" placeholder=".span1">
|
563
|
+
</div>
|
564
|
+
<div class="controls controls-row">
|
565
|
+
<input class="span3" type="text" placeholder=".span3">
|
566
|
+
<input class="span2" type="text" placeholder=".span2">
|
567
|
+
</div>
|
568
|
+
<div class="controls controls-row">
|
569
|
+
<input class="span2" type="text" placeholder=".span2">
|
570
|
+
<input class="span3" type="text" placeholder=".span3">
|
571
|
+
</div>
|
572
|
+
<div class="controls controls-row">
|
573
|
+
<input class="span1" type="text" placeholder=".span1">
|
574
|
+
<input class="span4" type="text" placeholder=".span4">
|
575
|
+
</div>
|
576
|
+
</form>
|
577
|
+
<pre class="prettyprint linenums">
|
578
|
+
<div class="controls">
|
579
|
+
<input class="span5" type="text" placeholder=".span5">
|
580
|
+
</div>
|
581
|
+
<div class="controls controls-row">
|
582
|
+
<input class="span4" type="text" placeholder=".span4">
|
583
|
+
<input class="span1" type="text" placeholder=".span1">
|
584
|
+
</div>
|
585
|
+
...
|
586
|
+
</pre>
|
587
|
+
|
588
|
+
<h3>Uneditable inputs</h3>
|
589
|
+
<p>Present data in a form that's not editable without using actual form markup.</p>
|
590
|
+
<form class="bs-docs-example">
|
591
|
+
<span class="input-xlarge uneditable-input">Some value here</span>
|
592
|
+
</form>
|
593
|
+
<pre class="prettyprint linenums">
|
594
|
+
<span class="input-xlarge uneditable-input">Some value here</span>
|
595
|
+
</pre>
|
596
|
+
|
597
|
+
<h3>Form actions</h3>
|
598
|
+
<p>End a form with a group of actions (buttons). When placed within a <code>.form-horizontal</code>, the buttons will automatically indent to line up with the form controls.</p>
|
599
|
+
<form class="bs-docs-example">
|
600
|
+
<div class="form-actions">
|
601
|
+
<button type="submit" class="btn btn-primary">Save changes</button>
|
602
|
+
<button type="button" class="btn">Cancel</button>
|
603
|
+
</div>
|
604
|
+
</form>
|
605
|
+
<pre class="prettyprint linenums">
|
606
|
+
<div class="form-actions">
|
607
|
+
<button type="submit" class="btn btn-primary">Save changes</button>
|
608
|
+
<button type="button" class="btn">Cancel</button>
|
609
|
+
</div>
|
610
|
+
</pre>
|
611
|
+
|
612
|
+
<h3>Help text</h3>
|
613
|
+
<p>Inline and block level support for help text that appears around form controls.</p>
|
614
|
+
<h4>Inline help</h4>
|
615
|
+
<form class="bs-docs-example form-inline">
|
616
|
+
<input type="text"> <span class="help-inline">Inline help text</span>
|
617
|
+
</form>
|
618
|
+
<pre class="prettyprint linenums">
|
619
|
+
<input type="text"><span class="help-inline">Inline help text</span>
|
620
|
+
</pre>
|
621
|
+
|
622
|
+
<h4>Block help</h4>
|
623
|
+
<form class="bs-docs-example form-inline">
|
624
|
+
<input type="text">
|
625
|
+
<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
|
626
|
+
</form>
|
627
|
+
<pre class="prettyprint linenums">
|
628
|
+
<input type="text"><span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
|
629
|
+
</pre>
|
630
|
+
|
631
|
+
|
632
|
+
<hr class="bs-docs-separator">
|
633
|
+
|
634
|
+
|
635
|
+
<h2>Form control states</h2>
|
636
|
+
<p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
|
637
|
+
|
638
|
+
<h3>Input focus</h3>
|
639
|
+
<p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p>
|
640
|
+
<form class="bs-docs-example form-inline">
|
641
|
+
<input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused...">
|
642
|
+
</form>
|
643
|
+
<pre class="prettyprint linenums">
|
644
|
+
<input class="input-xlarge" id="focusedInput" type="text" value="This is focused...">
|
645
|
+
</pre>
|
646
|
+
|
647
|
+
<h3>Disabled inputs</h3>
|
648
|
+
<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
|
649
|
+
<form class="bs-docs-example form-inline">
|
650
|
+
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
|
651
|
+
</form>
|
652
|
+
<pre class="prettyprint linenums">
|
653
|
+
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
654
|
+
</pre>
|
655
|
+
|
656
|
+
<h3>Validation states</h3>
|
657
|
+
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
|
658
|
+
|
659
|
+
<form class="bs-docs-example form-horizontal">
|
660
|
+
<div class="control-group warning">
|
661
|
+
<label class="control-label" for="inputWarning">Input with warning</label>
|
662
|
+
<div class="controls">
|
663
|
+
<input type="text" id="inputWarning">
|
664
|
+
<span class="help-inline">Something may have gone wrong</span>
|
665
|
+
</div>
|
666
|
+
</div>
|
667
|
+
<div class="control-group error">
|
668
|
+
<label class="control-label" for="inputError">Input with error</label>
|
669
|
+
<div class="controls">
|
670
|
+
<input type="text" id="inputError">
|
671
|
+
<span class="help-inline">Please correct the error</span>
|
672
|
+
</div>
|
673
|
+
</div>
|
674
|
+
<div class="control-group info">
|
675
|
+
<label class="control-label" for="inputInfo">Input with info</label>
|
676
|
+
<div class="controls">
|
677
|
+
<input type="text" id="inputInfo">
|
678
|
+
<span class="help-inline">Username is taken</span>
|
679
|
+
</div>
|
680
|
+
</div>
|
681
|
+
<div class="control-group success">
|
682
|
+
<label class="control-label" for="inputSuccess">Input with success</label>
|
683
|
+
<div class="controls">
|
684
|
+
<input type="text" id="inputSuccess">
|
685
|
+
<span class="help-inline">Woohoo!</span>
|
686
|
+
</div>
|
687
|
+
</div>
|
688
|
+
</form>
|
689
|
+
<pre class="prettyprint linenums">
|
690
|
+
<div class="control-group warning">
|
691
|
+
<label class="control-label" for="inputWarning">Input with warning</label>
|
692
|
+
<div class="controls">
|
693
|
+
<input type="text" id="inputWarning">
|
694
|
+
<span class="help-inline">Something may have gone wrong</span>
|
695
|
+
</div>
|
696
|
+
</div>
|
697
|
+
<div class="control-group error">
|
698
|
+
<label class="control-label" for="inputError">Input with error</label>
|
699
|
+
<div class="controls">
|
700
|
+
<input type="text" id="inputError">
|
701
|
+
<span class="help-inline">Please correct the error</span>
|
702
|
+
</div>
|
703
|
+
</div>
|
704
|
+
<div class="control-group success">
|
705
|
+
<label class="control-label" for="inputSuccess">Input with success</label>
|
706
|
+
<div class="controls">
|
707
|
+
<input type="text" id="inputSuccess">
|
708
|
+
<span class="help-inline">Woohoo!</span>
|
709
|
+
</div>
|
710
|
+
</div>
|
711
|
+
</pre>
|
712
|
+
|
713
|
+
</section>
|
714
|
+
|