From 79843297a1d97045c504575ab9a6a29b3af8ffae Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Fri, 5 Nov 2021 15:44:38 +0100 Subject: Fixes #2842 - Fixing EmbedLiveSample errors for fr docs (#2851) * Fixes #2842 for CSS pages * Fixes #2842 for Web API pages * Fixes #2842 for other sections * Fix EmbedLiveSample for moved CSS page * Fixes #2842 for conflicting / orphaned docs --- files/fr/glossary/css_selector/index.html | 51 ++++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'files/fr/glossary') diff --git a/files/fr/glossary/css_selector/index.html b/files/fr/glossary/css_selector/index.html index ed038c9715..b5cd5760da 100644 --- a/files/fr/glossary/css_selector/index.html +++ b/files/fr/glossary/css_selector/index.html @@ -13,60 +13,61 @@ original_slug: Glossaire/Sélecteur_CSS ---

Un sélecteur CSS est la partie de la règle CSS qui désigne les éléments d'un document concernés par la règle. Les éléments correspondants auront le style spécifié par la règle qui leur est appliqué.

+

Exemple

Considérez ce code CSS :

-
p {
-  color: green;
-}
+
p {
+  color: green;
+}
 
-div.warning {
-  width: 100%;
-  border: 2px solid yellow;
-  color: white;
-  background-color: darkred;
-  padding:  0.8em 0.8em 0.6em;
-}
+div.warning {
+  width: 100%;
+  border: 2px solid yellow;
+  color: white;
+  background-color: darkred;
+  padding:  0.8em 0.8em 0.6em;
+}
 
-#customized {
-  font: 16px Lucida Grande, Arial, Helvetica, sans-serif;
-}
+#customized { + font: 16px Lucida Grande, Arial, Helvetica, sans-serif; +}

Les sélecteurs sont ici "p" (qui applique la couleur verte au texte de tout élément {{HTMLElement ("p")}}), "div.warning" (qui fait que tout élément {{HTMLElement ("div")}} appartenant à la {{Glossary ("Class", "classe CSS")}} "warning" ressemble à une boîte d'avertissement) et "#customized", qui définit la police de base de l'élément avec l'ID "customized" à 16 -pixel Lucida Grande ou l'une des polices de secours.

Nous pouvons ensuite appliquer ce CSS à du HTML, tel que :

-
<p>This is happy text.</p>
+
<p>This is happy text.</p>
 
-<div class="warning">
+<div class="warning">
   Be careful! There are wizards present, and they are quick to anger!
-</div>
+</div>
 
-<div id="customized">
-  <p>This is happy text.</p>
+<div id="customized">
+  <p>This is happy text.</p>
 
-  <div class="warning">
+  <div class="warning">
     Be careful! There are wizards present, and they are quick to anger!
-  </div>
-</div>
+ </div> +</div>

Le contenu de la page résultant ressemble à ceci:

-

{{EmbedLiveSample("glossary-selector-details", 640, 210)}}

+

{{EmbedLiveSample("Exemple", 640, 210)}}

Pour approfondir

Culture générale