Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite96e1db

Browse files
committed
Add a <w-br> element to represent a soft line-break.
<wbr> fails in Firefox and Prince.
1 parent017b966 commite96e1db

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ unless it's marked with class="para", in which case it's formatted as a normal p
107107
Must contain an email address as text, and wraps it into an
108108
appropriate`mailto:` link.
109109

110+
###`<w-br>`
111+
112+
Introduces a soft line-break inside an otherwise-nowrap context. This works in
113+
Firefox and Prince, where <wbr> fails, in addition to other browsers.
114+
110115
###`<cxx-function>`
111116

112117
Describes a C++ library function. Several nested elements help

‎framework.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@
3939
<linkrel="import"href="range.html"/>
4040
<linkrel="import"href="codeblock.html"/>
4141
<linkrel="import"href="grammar.html"/>
42+
<linkrel="import"href="weak-break.html"/>

‎weak-break.html‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- Copyright 2014 Google Inc. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
-->
15+
16+
<!-- <wbr> doesn't work inside white-space:nowrap in Firefox, and
17+
white-space:normal with a U+200B (zero-width space) doesn't work in Chrome.
18+
So this element uses both. -->
19+
20+
<polymer-elementname="w-br"noscript>
21+
<template><style>
22+
:host { white-space: normal;}
23+
:host::after {content:'\200b';}
24+
</style><wbr></template>
25+
</polymer-element>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp