1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Upgrading · Twitter Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="assets/css/docs.css" rel="stylesheet">
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
</head>
<body data-spy="scroll" data-target=".subnav" data-offset="50">
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="bs-docs-container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="./index.html">Bootstrap</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="">
<a href="./index.html">Home</a>
</li>
<li class="">
<a href="./scaffolding.html">Scaffolding</a>
</li>
<li class="">
<a href="./base-css.html">Base CSS</a>
</li>
<li class="">
<a href="./components.html">Components</a>
</li>
<li class="">
<a href="./javascript.html">Javascript</a>
</li>
<li class="">
<a href="./less.html">LESS</a>
</li>
<li class="divider-vertical"></li>
<li class="">
<a href="./download.html">Customize</a>
</li>
<li class="">
<a href="./examples.html">Examples</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="bs-docs-container">
<!-- Masthead
================================================== -->
<header class="jumbotron subhead" id="overview">
<h1>Upgrading to Bootstrap 2</h1>
<p class="lead">Learn about significant changes and additions since v1.4 with this handy guide.</p>
</header>
<!-- Project
================================================== -->
<section id="docs">
<div class="page-header">
<h1>Project changes</h1>
</div>
<ul>
<li>Docs: major updates across the board to general structure, examples, and code snippets. Also made responsive with new media queries.</li>
<li>Docs: all docs pages are now powered by Mustache templates and strings are wrapped in i18n tags for translation by the Twitter Translation Center. All changes to documentation must be done here and then compiled (similar to our CSS and LESS).</li>
<li>Repo directory structure: removed the compiled CSS from the root in favor of a large direct download link on the docs homepage. Compiled CSS is in <code>/docs/assets/css/</code>.</li>
<li>Docs and repo: one makefile, just type <code>make</code> in the Terminal and get updated docs and CSS.</li>
</ul>
</section>
<!-- Scaffolding
================================================== -->
<section id="scaffolding">
<div class="page-header">
<h1>Scaffolding</h1>
</div>
<h3>Grid system</h3>
<ul>
<li>Updated grid system, now only 12 columns instead of 16
<li>Responsive approach means your projects virtually work out of the box on smartphones, tablets, and more</li>
<li>Removed unused (by default) grid columns support for 17-24 columns</li>
</ul>
<h3>Responsive (media queries)</h3>
<ul>
<li>Media queries added for <strong>basic support</strong> across mobile and tablet devices
<li>Responsive CSS is compiled separately, as bootstrap-responsive.css</li>
</ul>
</section>
<!-- Base CSS
================================================== -->
<section id="baseCSS">
<div class="page-header">
<h1>Base CSS</h1>
</div>
<h3>Typography</h3>
<ul>
<li><code>h4</code> elements were dropped from 16px to 14px with a default <code>line-height</code> of 18px</li>
<li><code>h5</code> elements were dropped from 14px to 12px</li>
<li><code>h6</code> elements were dropped from 13px to 11px</li>
<li>Right-aligned option for blockquotes if <code>float: right;</code></li>
</ul>
<h3>Code</h3>
<ul>
<li>New graphical style for <code><code></code></li>
<li>Google Code Prettify styles updated (based on GitHub's gists)</li>
</ul>
<h3>Tables</h3>
<ul>
<li>Improved support for <code>colspan</code> and <code>rowspan</code></li>
<li>Styles now restricted to new base class, <code>.table</code></li>
<li>Table classes standardized with <code>.table-</code> required as a prefix</li>
<li>Removed unused table color options (too much code for such little impact)</li>
<li>Dropped support for TableSorter</li>
</ul>
<h3>Buttons</h3>
<ul>
<li>New classes for colors and sizes, all prefixed with <code>.btn-</code></li>
<li>IE9: removed gradients and added rounded corners</li>
<li>Updated active state to make styling clearer in button groups (new) and look better with custom transition</li>
<li>New mixin, <code>.buttonBackground</code>, to set button gradients</li>
<li>The <code>.secondary</code> class was removed from modal examples in our docs as it never had associated styles.</li>
</ul>
<h3>Forms</h3>
<ul>
<li>Default form style is now vertical (stacked) to use less CSS and add greater flexibility</li>
<li>Form classes standardized with <code>.form-</code> required as a prefix</li>
<li>New built-in form defaults for search, inline, and horizontal forms</li>
<li>For horizontal forms, previous classes <code>.clearfix</code> and <code>.input</code> are equivalent to the new <code>.control-group</code> and <code>.controls</code>.</li>
<li>More flexible horizontal form markup with classes for all styling, including new optional class for the <code>label</code></li>
<li>Form states: colors updated and customizable via new LESS variables</li>
</ul>
<h3>Icons, by Glyphicons</h3>
<ul>
<li>New Glyphicons Halflings icon set added in sprite form, in black and white</li>
<li>Simple markup required for an icon in tons of contexts: <code><i class="icon-cog"></></code></li>
<li>Add another class, <code>.icon-white</code>, for white variation of the same icon</li>
</ul>
</section>
<!-- Components
================================================== -->
<section id="components">
<div class="page-header">
<h1>Components</h1>
</div>
<h3>Button groups and dropdowns</h3>
<ul>
<li>Two brand new components in 2.0: button groups and button dropdowns</li>
<li>Dependency: button dropdowns are built on button groups, and therefore require all their styles</li>
<li>Button groups, <code>.btn-group</code>, can be grouped one level higher with a button toolbar, <code>.btn-toolbar</code></li>
</ul>
<h3>Navigation</h3>
<ul>
<li>Tabs and pills now require the use of a new base class, <code>.nav</code>, on their <code><ul></code> and the class names are now <code>.nav-pills</code> and <code>.nav-tabs</code>.</li>
<li>New nav list variation added that uses the same base class, <code>.nav</code></li>
<li>Vertical tabs and pills have been added—just add <code>.nav-stacked</code> to the <code><ul></code></li>
<li>Pills were restyled to be less rounded by default</li>
<li>Pills now have dropdown menu support (they share the same markup and styles as tabs)</li>
</ul>
<h3>Navbar (formerly topbar)</h3>
<ul>
<li>Base class changed from <code>.topbar</code> to <code>.navbar</code></li>
<li>Now supports static position (default behavior, not fixed) and fixed to the top of viewport via <code>.navbar-fixed-top</code> (previously only supported fixed)</li>
<li>Added vertical dividers to top-level nav</li>
<li>Improved support for inline forms in the navbar, which now require <code>.navbar-form</code> to properly scope styles to only the intended forms.</li>
<li>Navbar search form now requires use of the <code>.navbar-search</code> class and its input the use of <code>.search-query</code>. To position the search form, you <strong>must</strong> use <code>.pull-left</code> or <code>.pull-right</code>.</li>
<li>Added optional responsive markup for collapsing navbar contents for smaller resolutions and devices. <a href="./components.html#navbar">See navbar docs</a> for how to utilize.</li>
</ul>
<h3>Dropdown menus</h3>
<ul>
<li>Updated the <code>.dropdown-menu</code> to tighten up spacing</li>
<li>Now requires you to add a <code><span class="caret"></span></code> to show the dropdown arrow</li>
<li>Now requires you to add a <code>data-toggle="dropdown"</code> attribute to obtain toggling behavior</li>
<li>The navbar (fixed topbar) has brand new dropdowns. Gone are the dark versions and in their place are the standard white ones with an additional caret at their tops for clarity of position.</li>
</ul>
<h3>Labels</h3>
<ul>
<li>Label colors updated to match form state colors</li>
<li>Not only do they match graphically, but they are powered by the same new variables</li>
</ul>
<h3>Thumbnails</h3>
<ul>
<li>Formerly <code>.media-grid</code>, now just <code>.thumbnails</code>, we've thoroughly extended this component for more uses while maintaining overall simplicity out of the box.</li>
<li>Individual thumbnails now require <code>.thumbnail</code> class</li>
</ul>
<h3>Alerts</h3>
<ul>
<li>New base class: <code>.alert</code> instead of <code>.alert-message</code></li>
<li>Class names standardized for other options, now all starting with <code>.alert-</code></li>
<li>Redesigned base alert styles to combine the default alerts and block-level alerts into one</li>
<li>Block level alert class changed: <code>.alert-block</code> instead of <code>.block-message</code></li>
</ul>
<h3>Progress bars</h3>
<ul>
<li>New in 2.0</li>
<li>Features multiple styles via classes, including striped and animated variations via CSS3</li>
</ul>
<h3>Miscellaneous components</h3>
<ul>
<li>Added documentation for the well component and the close icon (used in modals and alerts)</li>
</ul>
</section>
<!-- Javascript
================================================== -->
<section id="javascript">
<div class="page-header">
<h1>Javascript plugins</h1>
</div>
<div class="alert alert-info">
<strong>Heads up!</strong> We've rewritten just about everything for our plugins, so head on over to <a href="./javascript.html">the Javascript page</a> to learn more.
</div>
<h3>Tooltips</h3>
<ul>
<li>The plugin method has been renamed from <code>twipsy()</code> to <code>tooltip()</code>, and the class name changed from <code>twipsy</code> to <code>tooltip</code>.</li>
<li>The <code>placement</code> option value that was <code>below</code> is now <code>bottom</code>, and <code>above</code> is now <code>top</code>.</li>
<li>The <code>animate</code> option was renamed to <code>animation</code>.</li>
<li>The <code>html</code> option was removed, as the tooltips default to allowing HTML now.</li>
</ul>
<h3>Popovers</h3>
<ul>
<li>Child elements now properly namespaced: <code>.title</code> to <code>.popover-title</code>, <code>.inner</code> to <code>.popover-inner</code>, and <code>.content</code> to <code>.popover-content</code>.</li>
<li>The <code>placement</code> option value that was <code>below</code> is now <code>bottom</code>, and <code>above</code> is now <code>top</code>.</li>
</ul>
<h3>New plugins</h3>
<ul>
<li><a href="./javascript.html#collapse">Collapse</a></li>
<li><a href="./javascript.html#carousel">Carousel</a></li>
<li><a href="./javascript.html#typeahead">Typeahead</a></li>
</ul>
</section>
<!-- Footer
================================================== -->
<footer class="footer">
<p class="pull-right"><a href="#">Back to top</a></p>
<p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
<p>Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
</footer>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/google-code-prettify/prettify.js"></script>
<script src="assets/js/bootstrap-transition.js"></script>
<script src="assets/js/bootstrap-alert.js"></script>
<script src="assets/js/bootstrap-modal.js"></script>
<script src="assets/js/bootstrap-dropdown.js"></script>
<script src="assets/js/bootstrap-scrollspy.js"></script>
<script src="assets/js/bootstrap-tab.js"></script>
<script src="assets/js/bootstrap-tooltip.js"></script>
<script src="assets/js/bootstrap-popover.js"></script>
<script src="assets/js/bootstrap-button.js"></script>
<script src="assets/js/bootstrap-collapse.js"></script>
<script src="assets/js/bootstrap-carousel.js"></script>
<script src="assets/js/bootstrap-typeahead.js"></script>
<script src="assets/js/application.js"></script>
</body>
</html>
|