aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/css/word-spacing
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/css/word-spacing
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/css/word-spacing')
-rw-r--r--files/fr/web/css/word-spacing/index.html128
1 files changed, 128 insertions, 0 deletions
diff --git a/files/fr/web/css/word-spacing/index.html b/files/fr/web/css/word-spacing/index.html
new file mode 100644
index 0000000000..808ec87c68
--- /dev/null
+++ b/files/fr/web/css/word-spacing/index.html
@@ -0,0 +1,128 @@
+---
+title: word-spacing
+slug: Web/CSS/word-spacing
+tags:
+ - CSS
+ - Propriété
+ - Reference
+translation_of: Web/CSS/word-spacing
+---
+<div>{{CSSRef}}</div>
+
+<p>La propriété <strong><code>word-spacing</code></strong> définit la règle d'espacement utilisée entre les balises et entre les mots.</p>
+
+<div>{{EmbedInteractiveExample("pages/css/word-spacing.html")}}</div>
+
+<p class="hidden">Le code source de cet exemple interactif est disponible dans un dépôt GitHub. Si vous souhaitez contribuez à ces exemples, n'hésitez pas à cloner <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> et à envoyer une <em>pull request</em> !</p>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre class="brush:css no-line-numbers">/* Avec un mot-clé */
+word-spacing: normal;
+
+/* Valeurs de longueur */
+/* type &lt;length&gt; */
+word-spacing: 3px;
+word-spacing: 0.3em;
+
+/* Valeurs en pourcentages */
+/* type &lt;percentage&gt; */
+word-spacing: 50%;
+word-spacing: 200%;
+
+/* Valeurs globales */
+word-spacing: inherit;
+word-spacing: initial;
+word-spacing: unset;
+</pre>
+
+<h3 id="Valeurs">Valeurs</h3>
+
+<dl>
+ <dt><code>normal</code></dt>
+ <dd>L'espace normale entre les mots (ou inter-mot), tel qu'il est défini par la police courante et/ou le navigateur.</dd>
+ <dt><code>&lt;length&gt;</code></dt>
+ <dd>Une valeur de longueur définit l'espace qu'on ajoute à l'inter-mot intrinsèque défini par la police. Voir {{cssxref("&lt;length&gt;")}} pour les différentes valeurs et unités possibles.</dd>
+ <dt><code>&lt;percentage&gt;</code></dt>
+ <dd>Une valeur en pourcentages définit la taille de l'inter-mot à utiliser par rapport à la position du prochain caractère (si on utilise <code>-100%</code>, l'espace sera nul et si on utilise <code>100%</code>, il sera doublé). Voir {{cssxref("&lt;percentage&gt;")}} pour les différentes valeurs et unités possibles.</dd>
+</dl>
+
+<h3 id="Syntaxe_formelle">Syntaxe formelle</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Exemple">Exemple</h2>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html">&lt;p id="ligne1"&gt;Voici le texte de la ligne 1 &lt;/p&gt;
+&lt;p id="ligne2" &gt;Et voilà celui de la ligne 2 &lt;/p&gt;
+</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css">#ligne1 {
+ word-spacing: 15px;
+}
+
+#ligne2 {
+ word-spacing: 5em;
+}
+</pre>
+
+<h3 id="Résultat">Résultat</h3>
+
+<p>{{EmbedLiveSample("Exemple")}}</p>
+
+<h2 id="Accessibilité">Accessibilité</h2>
+
+<p>Utiliser des valeurs trop importantes (positives ou négatives) pour <code>word-spacing</code> rend le texte illisible. Si l'espacement utilisé est trop grand, la structure visuelle ne permettra plus d'identifier une phrase. Si l'espacement est trop petit, les mots se chevaucheront et on ne pourra plus distinguer le début et la fin de chaque mot.</p>
+
+<p>La bonne valeur à utiliser pour <code>word-spacing</code> doit être déterminée au cas par cas, en fonction du type de police utilisé et de la largeur de celle-ci.</p>
+
+<ul>
+ <li><a href="/fr/docs/Web/Accessibility/Understanding_WCAG/Perceivable#Guideline_1.4_Make_it_easier_for_users_to_see_and_hear_content_including_separating_foreground_from_background">Comprendre les règles WCAG 1.4</a></li>
+ <li><a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-visual-presentation.html" rel="noopener">Understanding Success Criterion 1.4.8 - W3C Understanding WCAG 2.0</a></li>
+</ul>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">État</th>
+ <th scope="col">Commentaires</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS3 Text', '#propdef-word-spacing', 'word-spacing')}}</td>
+ <td>{{Spec2('CSS3 Text')}}</td>
+ <td>Remplace les valeurs précédentes avec une valeur <code>&lt;spacing-limit&gt;</code> qui définit la même valeur et la valeur <code>&lt;percentage&gt;</code> et permet d'avoir trois valeurs pour décrire un optimum, un minimum, et un maximum.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Transitions', '#animatable-css', 'word-spacing')}}</td>
+ <td>{{Spec2('CSS3 Transitions')}}</td>
+ <td><code>word-spacing</code> peut désormais être animé.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS2.1', 'text.html#propdef-word-spacing', 'word-spacing')}}</td>
+ <td>{{Spec2('CSS2.1')}}</td>
+ <td>Aucun changement.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS1', '#word-spacing', 'word-spacing')}}</td>
+ <td>{{Spec2('CSS1')}}</td>
+ <td>Définition initiale.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<p class="hidden">Pour contribuer à ces données de compatibilité, vous pouvez envoyer une <em>pull request</em> sur ce dépôt: <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>.</p>
+
+<p>{{Compat("css.properties.word-spacing")}}</p>