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

32341 text wrap #2746

Merged
merged 5 commits into from
Mar 19, 2024
Merged
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
14 changes: 14 additions & 0 deletions live-examples/css-examples/text/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@
"title": "CSS Demo: text-wrap",
"type": "css"
},
"textWrapMode": {
"cssExampleSrc": "./live-examples/css-examples/text/text-wrap-mode.css",
"exampleCode": "./live-examples/css-examples/text/text-wrap-mode.html",
"fileName": "text-wrap-mode.html",
"title": "CSS Demo: text-wrap-mode",
"type": "css"
},
"textWrapStyle": {
"cssExampleSrc": "./live-examples/css-examples/text/text-wrap-style.css",
"exampleCode": "./live-examples/css-examples/text/text-wrap-style.html",
"fileName": "text-wrap-style.html",
"title": "CSS Demo: text-wrap-style",
"type": "css"
},
"userSelect": {
"cssExampleSrc": "./live-examples/css-examples/text/user-select.css",
"exampleCode": "./live-examples/css-examples/text/user-select.html",
Expand Down
11 changes: 11 additions & 0 deletions live-examples/css-examples/text/text-wrap-mode.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.whole-content-wrapper {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}

#example-element {
border: 1px solid #c5c5c5;
width: 250px;
}
28 changes: 28 additions & 0 deletions live-examples/css-examples/text/text-wrap-mode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<section id="example-choice-list" class="example-choice-list large" data-property="text-wrap-mode">
<div class="example-choice" initial-choice="true">
<pre><code class="language-css">text-wrap-mode: wrap;</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">text-wrap-mode: nowrap;</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">
<div class="whole-content-wrapper">
<p>Edit the text in the box:</p>
<div id="example-element" class="transition-all">
<p contenteditable>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem aut cum eum id quos est.
</p>
</div>
</div>
</section>
</div>
11 changes: 11 additions & 0 deletions live-examples/css-examples/text/text-wrap-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.whole-content-wrapper {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}

#example-element {
border: 1px solid #c5c5c5;
width: 250px;
}
42 changes: 42 additions & 0 deletions live-examples/css-examples/text/text-wrap-style.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<section id="example-choice-list" class="example-choice-list large" data-property="text-wrap-style">
<div class="example-choice" initial-choice="true">
<pre><code class="language-css">text-wrap-style: auto;</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">text-wrap-style: balance;</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">text-wrap-style: pretty;</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">text-wrap-style: stable;</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">
<div class="whole-content-wrapper">
<p>Edit the text in the box:</p>
<div id="example-element" class="transition-all">
<p contenteditable>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem aut cum eum id quos est.
</p>
</div>
</div>
</section>
</div>
Loading