-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WCAG upgrade -- add example for alignment
- Loading branch information
Showing
3 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
{ | ||
"title": "GCWeb Alignment example", | ||
"language": "en", | ||
"altLangPage": "alignment-fr.html", | ||
"breadcrumbs": [ | ||
{ "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" } | ||
], | ||
"dateModified": "2023-06-19" | ||
} | ||
--- | ||
<div class="wb-prettify all-pre"></div> | ||
|
||
<h2>Horizontal Alignment</h2> | ||
<h3> Left aligned <code>text-left</code></h3> | ||
<p class="text-left">Use to align text to the left.</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-left</strong>">Use to align text to the left.</p></code></pre> | ||
|
||
<h3> Right aligned <code>text-right</code></h3> | ||
<p class="text-right">Use to align text to the right.</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-right</strong>">Use to align text to the right.</p></code></pre> | ||
|
||
<h3> Center <code>text-center</code></h3> | ||
<p class="text-center">Use to align text to the center.</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-center</strong>">Use to align text to the center.</p></code></pre> | ||
|
||
<h3> Center content blocks <code>center-block</code></h3> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<img src="https://placehold.it/140x140" class="img-rounded center-block" alt="A generic square placeholder image with rounded corners"> | ||
</div> | ||
</div> | ||
<h4>Code</h4> | ||
<pre><code><img <strong>class="center-block"</strong> alt="..." src="x.jpg" /></code></pre> | ||
|
||
<h3> Left aligned from small view <code>text-sm-left</code></h3> | ||
<p class="text-right text-sm-left">Left-aligned in small view and over</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="text-right <strong>text-sm-left</strong>">Left-aligned in small view and over</p></code></pre> | ||
|
||
<h3> Right aligned from small view <code>text-sm-right</code></h3> | ||
<p class="text-sm-right">Right-aligned in small view and over</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-sm-right</strong>">Right-aligned in small view and over</p></code></pre> | ||
|
||
<h2> Vertical alignment </h2> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Class</th> | ||
<th>Example</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th><code>align-top</code> | ||
<div class="mrgn-bttm-xl"></div></th> | ||
<td class="align-top"><p class="margin-top-none margin-bottom-none">Resulting text, top vertical alignment</p></td> | ||
</tr> | ||
<tr> | ||
<th><code>align-middle</code> | ||
<div class="mrgn-bttm-xl"></div></th> | ||
<td class="align-middle"><p class="mrgn-tp-0 mrgn-bttm-0">Resulting text, middle vertical alignment</p></td> | ||
</tr> | ||
<tr> | ||
<td><code>align-bottom</code> | ||
<div class="mrgn-bttm-xl"></div></td> | ||
<td class="align-bottom"><p class="margin-top-none margin-bottom-none">Resulting text, middle vertical alignment</p></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<h3>Code</h3> | ||
<pre><code><table> | ||
<tr> | ||
<td> ... </td> | ||
<td class="<strong> align-top </strong>"><p class="margin-top-none margin-bottom-none"> ... </p></td> | ||
</tr> | ||
<tr> | ||
<td> ... </td> | ||
<td class="<strong> align-middle </strong>"><p class="margin-top-none margin-bottom-none"> ... </p></td> | ||
</tr> | ||
<tr> | ||
<td> ... </td> | ||
<td class="<strong> align-bottom </strong>"><p class="margin-top-none margin-bottom-none"> ... </p></td> | ||
</tr> | ||
</table></code></pre> | ||
|
||
<h2>Items Alignment (Grid)</h2> | ||
<p>The following CSS classes are used in conjunction with flex grids. Examples of these are with the example of the flex grid. (link to come)</p> | ||
<ul> | ||
<li><code>align-self-center</code></li> | ||
<li><code>align-self-end</code></li> | ||
<li><code>align-items-center</code></li> | ||
<li><code>align-items-sm-center</code></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
{ | ||
"title": "Alignement", | ||
"language": "fr", | ||
"altLangPage": "alignment-en.html", | ||
"dateModified": "2023-06-19" | ||
} | ||
--- | ||
<div class="wb-prettify all-pre"></div> | ||
<h2>Alignement horizontal</h2> | ||
|
||
<h3>Aligné à gauche (<code>text-left</code>)</h3> | ||
<p class="text-left">Texte aligné à gauche.</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-left</strong>">Texte aligné à gauche.</p></code></pre> | ||
|
||
<h3>Aligné à droite (<code>text-right</code>)</h3> | ||
<p class="text-right">Texte aligné à droite.</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-right</strong>">Texte aligné à droite.</p></code></pre> | ||
|
||
<h3>Centré (<code>text-center</code>)</h3> | ||
<p class="text-center">Texte aligné au centre.</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-center</strong>">Texte aligné au centre.</p></code></pre> | ||
|
||
<h3>Centrer des blocs de contenu (<code>center-block</code>)</h3> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<img src="https://placehold.it/140x140" class="img-rounded center-block" alt="Une image de paramètre fictif carré dont les coins sont arrondis"> | ||
</div> | ||
</div> | ||
<h4>Code</h4> | ||
<pre><code><img <strong>class="center-block"</strong> alt="..." src="x.jpg" /></code></pre> | ||
|
||
<h3>Aligné à gauche à partir de la petite vue<code>text-sm-left</code></h3> | ||
<p class="text-right text-sm-left">Aligné vers la gauche dans la petite vue et plus</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="text-right <strong>text-sm-left</strong>">Aligné vers la gauche dans la petite vue et plus</p></code></pre> | ||
|
||
<h3>Aligné à droite à partir de la petite vue<code>text-sm-right</code></h3> | ||
<p class="text-sm-right">Aligné vers la droite dans la petite vue et plus</p> | ||
<h4>Code</h4> | ||
<pre><code><p class="<strong>text-sm-right</strong>">Aligné vers la droite dans la petite vue et plus</p></code></pre> | ||
|
||
<h2>Alignement vertical</h2> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Classe CSS</th> | ||
<th>Exemple</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th>Haut (<code>align-top</code>) | ||
<div class="mrgn-bttm-xl"></div></th> | ||
<td class="align-top"><p class="margin-top-none margin-bottom-none">Texte aligné en haut</p></td> | ||
</tr> | ||
<tr> | ||
<th>Milieu (<code>align-middle</code>) | ||
<div class="mrgn-bttm-xl"></div></th> | ||
<td class="align-middle"><p class="margin-top-none margin-bottom-none">Texte aligné au milieu</p></td> | ||
</tr> | ||
<tr> | ||
<th>Bas (<code>align-bottom</code>) | ||
<div class="mrgn-bttm-xl"></div></th> | ||
<td class="align-bottom"><p class="margin-top-none margin-bottom-none">Texte aligné en bas</p></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<h3>Code</h3> | ||
<pre><code><table> | ||
<tr> | ||
<td> ... </td> | ||
<td class="<strong> align-top </strong>"><p class="margin-top-none margin-bottom-none"> ... </p></td> | ||
</tr> | ||
<tr> | ||
<td> ... </td> | ||
<td class="<strong> align-middle </strong>"><p class="margin-top-none margin-bottom-none"> ... </p></td> | ||
</tr> | ||
<tr> | ||
<td> ... </td> | ||
<td class="<strong> align-bottom </strong>"><p class="margin-top-none margin-bottom-none"> ... </p></td> | ||
</tr> | ||
</table></code></pre> | ||
|
||
<h2>Alignement des items (Grille)</h2> | ||
<p>Les classes CSS suivantes sont utilisé conjointement avec les grilles flex. Les examples de ces derniers sont avec l'exemple de la grille flex. (lien à venir)</p> | ||
<ul> | ||
<li><code>align-self-center</code></li> | ||
<li><code>align-self-end</code></li> | ||
<li><code>align-items-center</code></li> | ||
<li><code>align-items-sm-center</code></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"dct": "http://purl.org/dc/terms/", | ||
"title": { "@id": "dct:title", "@container": "@language" }, | ||
"description": { "@id": "dct:description", "@container": "@language" }, | ||
"modified": "dct:modified" | ||
}, | ||
"title": { | ||
"en": "Alignment", | ||
"fr": "Alignment" | ||
}, | ||
"description": { | ||
"en": "Alignment with custom styles.", | ||
"fr": "Alignment avec des styles personalisés." | ||
}, | ||
"modified": "2023-06-19", | ||
"componentName": "alignment", | ||
"processing": "baseline", | ||
"status": "stable", | ||
"pages": { | ||
"examples": [ | ||
{ | ||
"title": "Alignment", | ||
"language": "en", | ||
"path": "alignment-en.html" | ||
}, | ||
{ | ||
"title": "Alignment", | ||
"language": "fr", | ||
"path": "alignment-fr.html" | ||
} | ||
] | ||
} | ||
} |