Skip to content

Commit

Permalink
feat(css): Add example of overflow-clip-margin (#2474)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedziolkaMichal authored Jul 24, 2023
1 parent 3f4131c commit 4a01bef
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
7 changes: 7 additions & 0 deletions live-examples/css-examples/basic-box-model/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@
"title": "CSS Demo: overflow-block",
"type": "css"
},
"overflowClipMargin": {
"cssExampleSrc": "./live-examples/css-examples/basic-box-model/overflow-clip-margin.css",
"exampleCode": "./live-examples/css-examples/basic-box-model/overflow-clip-margin.html",
"fileName": "overflow-clip-margin.html",
"title": "CSS Demo: overflow-clip-margin",
"type": "css"
},
"overflowInline": {
"cssExampleSrc": "./live-examples/css-examples/basic-box-model/overflow.css",
"exampleCode": "./live-examples/css-examples/basic-box-model/overflow-inline.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#example-element {
width: 15em;
height: 9em;
border: medium dotted;
padding: 0.75em;
text-align: left;
overflow: clip;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<section id="example-choice-list" class="example-choice-list large" data-property="overflow-clip-margin">

<div class="example-choice">
<pre><code class="language-css">overflow-clip-margin: 0px;</code></pre>
<button type="button" class="copy hidden" aria-hidden="true">
<span class="visually-hidden">Copy to Clipboard</span>
</button>
</div>

<div class="example-choice" initial-choice="true">
<pre><code class="language-css">overflow-clip-margin: 20px;</code></pre>
<button type="button" class="copy hidden" aria-hidden="true">
<span class="visually-hidden">Copy to Clipboard</span>
</button>
</div>

<div class="example-choice">
<pre><code class="language-css">overflow-clip-margin: 2rem;</code></pre>
<button type="button" class="copy hidden" aria-hidden="true">
<span class="visually-hidden">Copy to Clipboard</span>
</button>
</div>

<div class="example-choice">
<pre><code class="language-css">overflow-clip-margin: 4ch;</code></pre>
<button type="button" class="copy hidden" aria-hidden="true">
<span class="visually-hidden">Copy to Clipboard</span>
</button>
</div>

</section>

<div id="output" class="output large hidden">
<section id="default-example" class="default-example">
<p id="example-element">Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth.</p>
</section>
</div>

0 comments on commit 4a01bef

Please sign in to comment.