Geoportail V3 - Workshop

Twitter Bootstrap & LESSCSS

Bootstrap

Framework
(HTML) CSS (Javascript)

Mobile first

Contrairement à Bootstrap2, dans la version 3
Bootstrap is mobile first.
Les styles adaptés au mobile sont partout dans la librairie.

Normalize

For improved cross-browser rendering
Normalize.css

Containers

...
or
...

Grid System

12 colonnes
### Grid System
### Grid System

Grid System

media queries
 /* Extra small devices (phones, less than 768px) */
/* No media query since this is the default in Bootstrap */

/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm-min) { ... }

/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md-min) { ... }

/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg-min) { ... }

Grid System

max-width
@media (max-width: @screen-xs-max) { ... }
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... }
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... }
@media (min-width: @screen-lg-min) { ... }

Buttons




Responsive utilities

.visible-xs-* (ex. .visible-xs-block)
.hidden-xs
more info

Less

CSS preprocessor
variables, mixins, functions, nesting
lesscss.org