Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content - Spacing and Borders - Created Example Pages #2275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions common/spacing-borders/index.json-ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"@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": "Spacing and Borders",
"fr": "Espacement et Bordures"
},
"description": {
"en": "This page provides examples and code snippets for implementing various spacing and border styles in a web layout.",
"fr": "Cette page fournit des exemples et des extraits de code pour l'implémentation de divers styles d'espacement et de bordures dans une mise en page web."
},
"modified": "2024-03-05",
"componentName": "spacing-borders",
"status": "stable",
"pages": {
"docs": [
{
"title": "Spacing and Borders",
"language": "en",
"path": "spacing-borders-en.html"
},
{
"title": "Espacement et Bordures",
"language": "fr",
"path": "spacing-borders-fr.html"
}
]
}
}
320 changes: 320 additions & 0 deletions common/spacing-borders/spacing-borders-en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
---
{
"title": "Spacing and Borders",
"language":"en",
"altLangPage":"spacing-borders-fr.html",
"breadcrumbs":
[
{
"title": "GCWeb home",
"link": "https://wet-boew.github.io/themes-dist/GCWeb/index-en.html"
}
],
"secondlevel": false,
"dateModified": "2024-03-05",
"share": "true"
}
---
<h2><code>.margin-bottom-none</code></h2>
<div class="row">
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm ">
<div class="margin-bottom-none">No bottom Margin</div>
</div>
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm ">
<div class="margin-bottom-small margin-bottom-none">20 pixel bottom Margin</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="margin-bottom-none"&gt;&lt;/div&gt;
&lt;div class="margin-bottom-small margin-bottom-none"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.margin-bottom-small</code></h2>
<div class="row">
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="margin-bottom-small">Small bottom Margin</div>
</div>
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div>Default bottom Margin</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="margin-bottom-small"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.margin-top-large</code></h2>
<div class="row">
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="margin-top-large">Large top Margin</div>
</div>
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div>Default top Margin</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="margin-top-large"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.margin-top-medium</code></h2>
<div class="row">
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="margin-top-medium">Medium top Margin</div>
</div>
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div>Default top Margin</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="margin-top-medium"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
Comment on lines +18 to +66
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move those example at the bottom of the page as they are not recommended. They were only added to ease a transition between WET 3 to WET 4.

Please put it in a section named "Spacing utility not recommended" followed by an expand/collapse to view those item where you will downgrade the h2 for an h3. Something like:

<h2>Spacing utilities that are not recommended</h2>
<details>
<summary>Only to ease fast content transition from WET 3 to WET 4</summary>

<h3><code>.margin-bottom-none</code></h3>
....

</details>

<h2><code>.mb-sm-5</code></h2>
<div class="row">
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="mb-sm-5">Bottom Margin of 50</div>
</div>
<div class="col-md-4 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div>No bottom Margin</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="mb-sm-5"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<div>
<h2><code>.mrgn-*-*</code></h2>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is optional for the purpose of this working example but if you do it you will need to update all the other heading to be consistant. And do the same in French.

Ideally we will have a more meaningful name like:

Suggested change
<h2><code>.mrgn-*-*</code></h2>
<h2>Margin generic utilities - <code>.mrgn-*-*</code></h2>

<div class="container ">
<div class="row ">
<div class="col-sm-6 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="mrgn-lft-0 bg-info ">Left margin 0</div>
<div class="mrgn-lft-sm bg-info ">Left margin small (5px)</div>
<div class="mrgn-lft-md bg-info ">Left margin medium (15px)</div>
<div class="mrgn-lft-lg bg-info ">Left margin large (30px)</div>
<div class="mrgn-lft-xl bg-info ">Left margin extra large (50px)</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="mrgn-lft-0"&gt;&lt;/div&gt;
&lt;div class="mrgn-lft-sm"&gt;&lt;/div&gt;
&lt;div class="mrgn-lft-md"&gt;&lt;/div&gt;
&lt;div class="mrgn-lft-lg"&gt;&lt;/div&gt;
&lt;div class="mrgn-lft-xl"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<div class="row ">
<div class="col-sm-6 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="mrgn-rght-0 bg-info ">Right margin 0</div>
<div class="mrgn-rght-sm bg-info ">Right margin small (5px)</div>
<div class="mrgn-rght-md bg-info ">Right margin medium (15px)</div>
<div class="mrgn-rght-lg bg-info ">Right margin large (30px)</div>
<div class="mrgn-rght-xl bg-info ">Right margin extra large (50px)</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="mrgn-rght-0"&gt;&lt;/div&gt;
&lt;div class="mrgn-rght-sm"&gt;&lt;/div&gt;
&lt;div class="mrgn-rght-md"&gt;&lt;/div&gt;
&lt;div class="mrgn-rght-lg"&gt;&lt;/div&gt;
&lt;div class="mrgn-rght-xl"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<div class="row ">
<div class="col-sm-6 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="mrgn-bttm-0 bg-info ">Bottom margin 0</div>
<div class="mrgn-bttm-sm bg-info ">Bottom margin small (5px)</div>
<div class="mrgn-bttm-md bg-info ">Bottom margin medium (15px)</div>
<div class="mrgn-bttm-lg bg-info ">Bottom margin large (30px)</div>
<div class="mrgn-bttm-xl bg-info ">Bottom margin extra large (50px)</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="mrgn-bttm-0"&gt;&lt;/div&gt;
&lt;div class="mrgn-bttm-sm"&gt;&lt;/div&gt;
&lt;div class="mrgn-bttm-md"&gt;&lt;/div&gt;
&lt;div class="mrgn-bttm-lg"&gt;&lt;/div&gt;
&lt;div class="mrgn-bttm-xl"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<div class="row ">
<div class="col-sm-6 brdr-lft brdr-rght brdr-tp brdr-bttm">
<div class="mrgn-tp-0 bg-info ">Top margin 0</div>
<div class="mrgn-tp-sm bg-info ">Top margin small (5px)</div>
<div class="mrgn-tp-md bg-info ">Top margin medium (15px)</div>
<div class="mrgn-tp-lg bg-info ">Top margin large (30px)</div>
<div class="mrgn-tp-xl bg-info ">Top margin extra large (50px)</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="mrgn-tp-0"&gt;&lt;/div&gt;
&lt;div class="mrgn-tp-sm"&gt;&lt;/div&gt;
&lt;div class="mrgn-tp-md"&gt;&lt;/div&gt;
&lt;div class="mrgn-tp-lg"&gt;&lt;/div&gt;
&lt;div class="mrgn-tp-xl"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
</div>
</div>
<div class="container">
<h2>Demonstrating <code>.mt-auto</code> Effect</h2>
<div class="flex-container"
style="display: flex; flex-direction: column; height: 500px; background-color: #f0f0f0">
<div class="bg-info">Top Element: This is a standard flex item which
will stay at its natural position, which is at the top of the flex container.
</div>
<div class="mt-auto bg-info ">Bottom Element with .mt-auto:
By applying .mt-auto, this element takes up all available space on the top, effectively pushing
itself to the bottom of the flex container.
</div>
</div>
</div>
Comment on lines +79 to +160
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move those items to be the first item in this example page.

<h2><code>.p-0</code></h2>
<div class="row">
<div class="col-md-4">
<div class="p-0 bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">No Padding</div>
</div>
<div class="col-md-4">
<div class="bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="p-0"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.pl-2</code></h2>
<div class="row">
<div class="col-md-4">
<div class="pl-2 bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">5px Left Padding</div>
</div>
<div class="col-md-4">
<div class="bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="pl-2"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.pr-2</code></h2>
<div class="row">
<div class="col-md-4">
<div class="pr-2 text-right bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">5px
Right Padding</div>
</div>
<div class="col-md-4">
<div class="text-right bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default
Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="pr-2"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.px-2</code></h2>
<div class="row">
<div class="col-md-4">
<div class="px-2 bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">5px
Left and Right Padding</div>
</div>
<div class="col-md-4">
<div class="bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default
Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="px-2"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.pt-4</code></h2>
<div class="row">
<div class="col-md-4">
<div class="pt-4 bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">30px Top Padding</div>
</div>
<div class="col-md-4">
<div class="bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="pt-4"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.pb-4</code></h2>
<div class="row">
<div class="col-md-4">
<div class="pb-4 bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">30px Bottom Padding
</div>
</div>
<div class="col-md-4">
<div class="bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="pb-4"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.py-4</code></h2>
<div class="row">
<div class="col-md-4">
<div class="py-4 bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">30px Bottom and Top Padding
</div>
</div>
<div class="col-md-4">
<div class="bg-info brdr-lft brdr-rght brdr-tp brdr-bttm">Default Padding</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="py-4"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.brdr-lft</code></h2>
<div class="row">
<div class="col-md-4">
<div class="brdr-lft">Left Border Only</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="brdr-lft"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.brdr-rght</code></h2>
<div class="row">
<div class="col-md-4">
<div class="brdr-rght">Right Border Only</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="brdr-rght"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.brdr-tp</code></h2>
<div class="row">
<div class="col-md-4">
<div class="brdr-tp">Top Border Only</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="brdr-tp"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.brdr-bttm</code></h2>
<div class="row">
<div class="col-md-4">
<div class="brdr-bttm">Bottom Border Only</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="brdr-bttm"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.brdr-0</code></h2>
<div class="row">
<div class="col-md-4">
<div class="brdr-0 well">Well With No Borders</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="brdr-0 well"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="well">Well With Borders</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="well"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<h2><code>.brdr-rds-0</code></h2>
<div class="row">
<div class="col-md-4">
<div class="brdr-rds-0 well">Well With No Border Radius</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="brdr-rds-0 well"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="well">Well With Border Radius</div>
</div>
<div class="col-md-4">
<pre><code>&lt;div class="well"&gt;&lt;/div&gt;</code></pre>
</div>
</div>
Loading
Loading