upgrading.html 14.8 KB
Newer Older
1
2
3
4
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
5
    <title>Upgrading · Twitter Bootstrap</title>
6
7
8
9
10
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
11
12
    <link href="assets/css/bootstrap.css" rel="stylesheet">
    <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
13
14
15
    <link href="assets/css/docs.css" rel="stylesheet">
    <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">

Mark Otto's avatar
Mark Otto committed
16
17
18
19
20
    <!-- 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]-->

21
    <!-- Le fav and touch icons -->
Mark Otto's avatar
Mark Otto committed
22
    <link rel="shortcut icon" href="assets/ico/favicon.ico">
Mark Otto's avatar
Mark Otto committed
23
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
24
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
25
26
    <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">
27

28
29
  </head>

30
  <body data-spy="scroll" data-target=".bs-docs-sidebar" data-offset="10">
31

Mark Otto's avatar
Mark Otto committed
32
33
34
35
    <!-- Navbar
    ================================================== -->
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
36
        <div class="container">
Purwandi's avatar
Purwandi committed
37
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
Mark Otto's avatar
Mark Otto committed
38
39
40
41
42
43
44
45
            <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="">
Mark Otto's avatar
Mark Otto committed
46
                <a href="./index.html">Home</a>
Mark Otto's avatar
Mark Otto committed
47
              </li>
48
49
50
              <li class="">
                <a href="./getting-started.html">Get started</a>
              </li>
Mark Otto's avatar
Mark Otto committed
51
52
53
54
55
56
57
58
59
60
              <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="">
Mark Otto's avatar
Mark Otto committed
61
                <a href="./javascript.html">Javascript</a>
Mark Otto's avatar
Mark Otto committed
62
              </li>
63
              <li class="">
64
                <a href="./customize.html">Customize</a>
65
              </li>
Mark Otto's avatar
Mark Otto committed
66
67
68
69
70
71
            </ul>
          </div>
        </div>
      </div>
    </div>

Mark Otto's avatar
Mark Otto committed
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
<!-- 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>
113
  </ul>
Mark Otto's avatar
Mark Otto committed
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
</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>&lt;code&gt;</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>
Mark Otto's avatar
Mark Otto committed
146
    <li>New classes for colors and sizes, all prefixed with <code>.btn-</code></li>
Mark Otto's avatar
Mark Otto committed
147
148
149
    <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>
150
    <li>The <code>.secondary</code> class was removed from modal examples in our docs as it never had associated styles.</li>
Mark Otto's avatar
Mark Otto committed
151
152
153
  </ul>
  <h3>Forms</h3>
  <ul>
Mark Otto's avatar
Mark Otto committed
154
    <li>Default form style is now vertical (stacked) to use less CSS and add greater flexibility</li>
Mark Otto's avatar
Mark Otto committed
155
156
    <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>
157
    <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>
Mark Otto's avatar
Mark Otto committed
158
159
160
161
162
163
    <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>
Mark Otto's avatar
Mark Otto committed
164
165
    <li>Simple markup required for an icon in tons of contexts: <code>&lt;i class="icon-cog"&gt;&lt;/&gt;</code></li>
    <li>Add another class, <code>.icon-white</code>, for white variation of the same icon</li>
Mark Otto's avatar
Mark Otto committed
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
  </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>
185
    <li>Tabs and pills now require the use of a new base class, <code>.nav</code>, on their <code>&lt;ul&gt;</code> and the class names are now <code>.nav-pills</code> and <code>.nav-tabs</code>.</li>
Mark Otto's avatar
Mark Otto committed
186
    <li>New nav list variation added that uses the same base class, <code>.nav</code></li>
Mark Otto's avatar
Mark Otto committed
187
    <li>Vertical tabs and pills have been added&mdash;just add <code>.nav-stacked</code> to the <code>&lt;ul&gt;</code></li>
Mark Otto's avatar
Mark Otto committed
188
189
190
    <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>
191
192
193
194
195
196
197
198
199
  <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>
Mark Otto's avatar
Mark Otto committed
200
201
202
203
  <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>&lt;span class="caret"&gt;&lt;/span&gt;</code> to show the dropdown arrow</li>
204
    <li>Now requires you to add a <code>data-toggle="dropdown"</code> attribute to obtain toggling behavior</li>
Mark Otto's avatar
Mark Otto committed
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
    <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>
Kyle Robinson Young's avatar
Kyle Robinson Young committed
221
    <li>Redesigned base alert styles to combine the default alerts and block-level alerts into one</li>
Mark Otto's avatar
Mark Otto committed
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
    <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>
Mark Otto's avatar
Mark Otto committed
243
  <div class="alert alert-info">
244
    <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.
Mark Otto's avatar
Mark Otto committed
245
  </div>
246
247
248
249
250
251
252
  <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>
253
254
255
  <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>
256
    <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>
257
  </ul>
Mark Otto's avatar
Mark Otto committed
258
  <h3>New plugins</h3>
Mark Otto's avatar
Mark Otto committed
259
  <ul>
Mark Otto's avatar
Mark Otto committed
260
261
262
    <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>
Mark Otto's avatar
Mark Otto committed
263
264
265
266
  </ul>
</section>


267

Mark Otto's avatar
Mark Otto committed
268
269
270
271
272

   <!-- Footer
    ================================================== -->
    <footer class="footer">
      <div class="container">
Mark Otto's avatar
Mark Otto committed
273
        <p class="pull-right"><a href="#">Back to top</a></p>
274
275
276
        <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>
277
278
279
280
281
        <ul class="footer-links">
          <li><a href="http://blog.getbootstrap.com">Read the blog</a></li>
          <li><a href="https://github.com/twitter/bootstrap/issues?state=open">Submit issues</a></li>
          <li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li>
        </ul>
Mark Otto's avatar
Mark Otto committed
282
283
      </div>
    </footer>
284

285

286
287
288

    <!-- Le javascript
    ================================================== -->
289
    <!-- Placed at the end of the document so the pages load faster -->
290
    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Jacob Thornton's avatar
Jacob Thornton committed
291
    <script src="assets/js/jquery.js"></script>
292
    <script src="assets/js/google-code-prettify/prettify.js"></script>
Jacob Thornton's avatar
Jacob Thornton committed
293
294
295
296
297
298
299
300
301
302
303
304
    <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>
305
    <script src="assets/js/application.js"></script>
306
307


308
309
  </body>
</html>