Atelier "Optimiser ses CSS" ParisWeb 2008

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Atelier "Optimiser ses CSS" ParisWeb 2008 - Presentation Transcript

        • Pascale Lambert-Charreteur
        • CSS Débutant
        • css.mammouthland.net
        • Vincent Valentin
        • 20cent.net
    1. Optimiser ses CSS ?
    2. Un reset ?
      • * {
      • padding : 0 ;
      • margin : 0 ;
      • }
      • html, body {
      • padding : 0 ;
      • margin : 0 ;
      • }
    3. Ou : - Le reset d'Éric Meyer : http://meyerweb.com/eric/tools/css/reset/ - Le reset de Y! : http://developer.yahoo.com/yui/reset/ - ou un autre !
    4. L'important est d'obtenir une base de travail cohérente sur chaque navigateur.
    5. YUI propose une approche intéressante : reset + base + font http://yui.yahooapis.com/2.6.0/build/reset-fonts-grids/reset-fonts-grids.css
    6. Donner des noms pertinents aux sélecteurs
      • #gauche {
      • }
      • #droit {
      • }
      • #menu {
      • }
      • #contenu {
      • }
    7. Mettre des commentaires
      • /* commentaires */
    8. Regrouper les sélecteurs
      • h1 {
      • }
      • h2 {
      • }
      • p {
      • }
      • /* menu */
      • #menu {
      • }
      • #menu h2 {
      • }
    9. Synthétiser les déclarations
      • .class p {
      • font-family :arial, geneva, sans-serif;
      • font-size :100%;
      • font-weight :bold;
      • line-height :30px;
      • }
      • .class p {
      • font: bold 100%/30px arial, geneva, sans-serif;
      • }
      • background : background-color | background-image | background-repeat | background-attachment | background-position
      • border : border-width | border-style | border-color
      • font : font-style | font-variant | font-weight | font-size/line-height | font-family
      • list-style : list-style-type | list-style-position | list-style-image
    10. Gérer les ordres de priorités
        • <div id= &quot; menu &quot;>
        • <p> Quelle <span class =&quot; couleur &quot;> couleur </span> ? </p>
        • </div>
      • #menu p span {
      • color : red;
      • }
      • #menu span {
      • color : green;
      • }
      • p span .couleur {
      • color : blue;
      • }
      • La couleur est :
      • rouge
      • a : attribut style
      • b : nombre d' id
      • c : nombre de class
      • d : nombre d'éléments html
      • [ a b c d ]
      • #menu p span {
      • color : red;
      • }
      • [ 0 1 0 2 ]
      • #menu span {
      • color : green;
      • }
      • [ 0 1 0 1 ]
      • p span .couleur {
      • color : blue;
      • }
      • [ 0 0 1 2 ]
      • p span .couleur {
      • color : blue !important ;
      • }
      • Quelle couleur ?
    11. Des questions ?

    + MammouthlandMammouthland, 2 years ago

    custom

    1533 views, 2 favs, 5 embeds more stats

    Quelques pratiques et astuces pour optimiser ses fe more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1533
      • 1216 on SlideShare
      • 317 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 10
    Most viewed embeds
    • 310 views on http://css.mammouthland.net
    • 4 views on http://localhost
    • 1 views on file://
    • 1 views on http://www.webbegins.net
    • 1 views on http://www.css4design.com

    more

    All embeds
    • 310 views on http://css.mammouthland.net
    • 4 views on http://localhost
    • 1 views on file://
    • 1 views on http://www.webbegins.net
    • 1 views on http://www.css4design.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories