Geoportail V3 - Workshop – Twitter Bootstrap & LESSCSS



Geoportail V3 - Workshop – Twitter Bootstrap & LESSCSS

0 0


geoportailv3_workshop_bootstrap


On Github pgiraud / geoportailv3_workshop_bootstrap

Geoportail V3 - Workshop

Twitter Bootstrap & LESSCSS

Bootstrap

Framework(HTML) CSS (Javascript)

Mobile first

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

Normalize

For improved cross-browser renderingNormalize.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

Large button
Default button
Small button
Extra small button

Responsive utilities

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

Less

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