0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

move scaffolding stuff back to layout once more, split off the type docs to typography section

This commit is contained in:
Mark Otto 2014-07-14 08:34:56 -07:00
parent 8d55c3c0a3
commit cdb0f8229e
3 changed files with 48 additions and 47 deletions

View File

@ -1,47 +0,0 @@
---
layout: page
title: Scaffolding
---
Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.
### HTML5 doctype
Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.
{% highlight html %}
<!DOCTYPE html>
<html lang="en">
...
</html>
{% endhighlight %}
### Mobile first
With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, **Bootstrap is mobile first**. Mobile first styles can be found throughout the entire library instead of in separate files.
To ensure proper rendering and touch zooming, **add the viewport meta tag** to your `<head>`.
{% highlight html %}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% endhighlight %}
You can disable zooming capabilities on mobile devices by adding `user-scalable=no` to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall, we don't recommend this on every site, so use caution!
{% highlight html %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
{% endhighlight %}
### Typography and links
Bootstrap sets basic global display, typography, and link styles. Specifically, we:
- Set `background-color: #fff;` on the `<body>`
- Use the `@font-family-base`, `@font-size-base`, and `@line-height-base` attributes as our typographic base
- Set the global link color via `@link-color` and apply link underlines only on `:hover`
These styles can be found within `scaffolding.less`.
### Normalize
For improved cross-browser rendering, we use [Normalize.css](http://necolas.github.io/normalize.css/) to correct small inconsistencies across browsers and devices.

View File

@ -5,6 +5,17 @@ title: Typography
Bootstrap includes simple and easily customized typography across the project. In addition to the standard headings, body text, and lists, utility classes are also included.
## Global settings
Bootstrap sets basic global display, typography, and link styles. Specifically, we:
- Set `background-color: #fff;` on the `<body>`
- Use the `@font-family-base`, `@font-size-base`, and `@line-height-base` attributes as our typographic base
- Set the global link color via `@link-color` and apply link underlines only on `:hover`
These styles can be found within `scaffolding.less`.
## Headings
All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.

View File

@ -0,0 +1,37 @@
---
layout: page
title: Scaffolding
---
The scaffolding of Bootstrap refers to our general approach to building the project. It outlines the basic document requirements and project dependencies.
Bootstrap's general approach to writing HTML, CSS, and JavaScript, as well as our core settings, is referred to as scaffolding. This includes required responsive and cross browser enhancements, dependencies, and more.
### HTML5 doctype
Bootstrap makes use of certain HTML elements and CSS properties that **require** the use of the HTML5 doctype. Include it at the beginning of all your projects.
{% highlight html %}
<!DOCTYPE html>
<html lang="en">
...
</html>
{% endhighlight %}
### Mobile first
Bootstrap is developed *mobile first*, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries.
To ensure proper rendering and touch zooming, **add the viewport meta tag** to your `<head>`.
{% highlight html %}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% endhighlight %}
### Normalize
For improved cross-browser rendering, we use [Normalize.css](http://necolas.github.io/normalize.css/) to correct small inconsistencies across browsers and devices.
### jQuery plugins
All our JavaScript plugins are built on top of jQuery.