background preloader

Apprendre-ccs

Facebook Twitter

Le DOCTYPE qu'il vous faut. Par Jeffrey Zeldman Nouveau ! HTML5 arrive progressivement, et son doctype est bien plus simple à retenir : <! DOCTYPE html>. En le rencontrant, tous les navigateurs actuels passent en mode de rendu standard, vous pouvez donc l'utiliser dès aujourd'hui. Vous avez fait tout ce qu'il fallait, mais votre site ne s'affiche et ne fonctionne pas comme il le devrait dans les derniers navigateurs.

Vous avez utilisé du XHTML valide et des CSS. Vous avez utilisé le Modèle d'Objet de Document (DOM) normalisé du W3C pour manipuler les éléments dynamiques de la page. Ce bref article vous fournira des DOCTYPEs fonctionnels, et vous expliquera les effets pratiques, réels, de ces balises autrement très abstraites. Pourquoi un DOCTYPE ? Dans les normes du HTML et du XHTML, un DOCTYPE (contraction pour "Document Type Declaration") informe le validateur de la version de (X)HTML que vous utilisez, et doit apparaitre en première position dans chaque page web. De toute évidence, ce n'est pas ce que vous voulez. CSS Débutant : cours et tutoriels sur les feuilles de style CSS 1,2 et 3. CSS Débutant : cours et tutoriels sur les feuilles de style CSS 1,2 et 3.

Learning CSS. Understanding CSS and the modern web. Clip-path | CSS. Summary Initial value See the initial clipping path: 'overflow' and 'clip' properties Applies to all elements Inherited no Media visual Computed value Syntax clip-path: <uri> | none | inherit Values uri <uri> | none | inherit Examples Specifications Its extension to HTML elements is not yet present in any specification.

Browser compatibility See also Document Tags and Contributors. Sass - Syntactically Awesome Stylesheets. CSS Triangle. You can make them with a single div. It’s nice to have classes for each direction possibility. The idea is a box with zero width and height. The actual width and height of the arrow is determined by the width of the border. In an up arrow, for example, the bottom border is colored while the left and right are transparent, which forms the triangle. Demo See the Pen Animation to Explain CSS Triangles by Chris Coyier (@chriscoyier) on CodePen. Examples Dave Everitt writes in: For an equilateral triangle it’s worth pointing out that the height is 86.6% of the width so (border-left-width + border-right-width) * 0.866% = border-bottom-width. Foundation Documentation: Sass Mixins. Compass Home | Compass Documentation.

Create a Themable Button Set with Sass. If you have yet to give Sass a try, don’t worry, this is a good place to start. And if you haven’t already read Andrew’s primer on Sass, give it a read for a better understanding of what we’ll be covering and how to get setup with Sass. In this article, we’ll start with one of the simplest design elements on a page –– a button. In an earlier post, the talented Mat Helme designed a vector UI button pack, which I’ve recreated in plain CSS. We’ll need to make it themable by creating different color schemes using Sass variables, mixins and functions.

Let’s get started! The buttons and color themes we’ll be creating What We’ll Cover We’ll be refactoring the CSS using the SCSS (Sassy CSS) syntax, which is closer to the pure CSS syntax we’re all used to. Project/ index.html css/style.css scss/style.scss The “style.scss” file will compile into “style.css”, so that’s the only file we’ll need to link to in our HTML. Nestingvariablesmixinscolor functionspartials Starting with the CSS Nesting Selectors. CSS Gradient Patterns.