{"json_modified": "2016-10-06T19:36:15.865638", "uuid": "ff77cfec-8e09-481a-a499-37f96a318419", "title": "Cascade and inheritance", "url": "/en-US/docs/Learn/CSS/Introduction_to_CSS/Cascade_and_inheritance", "tags": ["Guide", "Beginner", "CSS", "Cascade", "Article", "CodingScripting", "Learn", "importance", "source order", "specificity"], "translations": [{"uuid": "11c8b2b6-8a1c-4fac-b0e5-c12fdadac408", "title": "La cascade et l'h\u00e9ritage", "url": "/fr/docs/Apprendre/CSS/Les_bases/La_cascade_et_l_h%C3%A9ritage", "tags": ["CSS", "Learn", "Beginner", "CodingScripting"], "summary": "Dans l'article pr\u00e9c\u00e9dent, nous avons vu les diff\u00e9rents s\u00e9lecteurs CSS. Au fur et \u00e0 mesure de leur utilisation, il pourra arriver que plusieurs r\u00e8gles, plusieurs s\u00e9lecteurs s'appliquent au m\u00eame \u00e9l\u00e9ment. Dans un tel sc\u00e9nario, quelle r\u00e8gle CSS sera appliqu\u00e9e \u00e0 l'\u00e9l\u00e9ment ? Pour r\u00e9pondre \u00e0 cette question, nous aurons besoin de voir les concepts de cascade et d'h\u00e9ritage. Dans cet article, nous traitons de la cascade, du poids des s\u00e9lecteurs et de la fa\u00e7on dont les propri\u00e9t\u00e9s h\u00e9ritent les unes des autres selon les diff\u00e9rentes r\u00e8gles.", "localization_tags": [], "locale": "fr", "last_edit": "2015-12-23T07:58:34", "review_tags": []}], "modified": "2016-10-06T19:36:15", "label": "Cascade and inheritance", "localization_tags": [], "locale": "en-US", "id": 165375, "last_edit": "2016-10-06T18:18:57", "summary": "In a previous article, we got into the various CSS selectors. At some point in your work, you'll find yourself in the situation where multiple CSS rules will have selectors matching the same element. In such cases, which CSS rule \"wins\", and ends up being the one that is finally applied to the element? This is controlled by a mechanism called the Cascade; this is also related to inheritance (elements will take some property values from their parents, but not others.) In this article we will define what the cascade is, what selector weight is, and how properties inherit from different rules.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "The_cascade", "title": "The cascade"}, {"id": "Importance", "title": "Importance"}, {"id": "Specificity", "title": "Specificity"}, {"id": "Source_order", "title": "Source order"}, {"id": "A_note_on_rule_mixing", "title": "A note on rule\u00a0mixing"}, {"id": "Inheritance", "title": "Inheritance"}, {"id": "Controlling_inheritance", "title": "Controlling inheritance"}, {"id": "Active_learning_playing_with_the_cascade", "title": "Active learning: playing with the cascade"}, {"id": "Playable_code", "title": "Playable code"}, {"id": "What's_next", "title": "What's next"}], "slug": "Learn/CSS/Introduction_to_CSS/Cascade_and_inheritance", "review_tags": []}