From aefed0ada9791338be11dd5318b24f17f517d51a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 12 Aug 2013 00:48:36 -0700 Subject: fixes #9317: document media queries --- css.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'css.html') diff --git a/css.html b/css.html index 04843a198..fa738f09e 100644 --- a/css.html +++ b/css.html @@ -83,6 +83,29 @@ base_url: "../"

Bootstrap includes a responsive, mobile-first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.

+

Media queries

+

We use the following media queries to create our the key breakpoints in our grid system.

+{% highlight css %} +/* Extra small devices (phones, up to 480px) */ +/* No media query since this is the default in Bootstrap */ + +/* Small devices (tablets, 768px and up) */ +@media (min-width: @screen-tablet) { ... } + +/* Medium devices (tablets, 992px and up) */ +@media (min-width: @screen-desktop) { ... } + +/* Large devices (large desktops, 1200px and up) */ +@media (min-width: @screen-large-desktop) { ... } +{% endhighlight %} +

We ocassionally expand on these media queries to include a max-width to limit CSS to a narrower set of devices.

+{% highlight css %} +@media (max-width: @screen-phone-max) { ... } +@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { ... } +@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { ... } +@media (min-width: @screen-large-desktop) { ... } +{% endhighlight %} +

Grid options

See how aspects of the Bootstrap grid system work across multiple devices with a handy table.

-- cgit v1.2.3