| <!DOCTYPE html> |
| <!-- |
| | Wrapping is only performed at an allowed break point, called a soft wrap |
| | opportunity. In most writing systems, in the absence of hyphenation a soft |
| | wrap opportunity occurs only at word boundaries. |
| | https://www.w3.org/TR/css3-text/#soft-wrap-opportunity |
| | https://www.w3.org/TR/css-text-3/#line-break-details |
| | |
| | When a soft wrap segment is being checked, trailing white space that will |
| | collapsed should not be included in the width when determining whether the |
| | segment can fit on the line. |
| --> |
| <html> |
| <head> |
| <style> |
| body { |
| margin: 0px; |
| font-family: Roboto; |
| font-size: 20px; |
| } |
| .containing-block { |
| background-color: #03a9f4; |
| width: 106px; |
| } |
| .colored-padding { |
| background-color: #f50057; |
| padding: 0px 0px 0px 2px; |
| } |
| </style> |
| </head> |
| <body> |
| <div class="containing-block"> |
| <div>abcdefghijk <span class="colored-padding"></span></div> |
| <div>abcdefghijk <span> </span> <span> </span> <span class="colored-padding"></span></div> |
| <div><span>abcdefghijk <span class="colored-padding"></span></span></div> |
| <div><span>abcdefghijk <span> </span> <span> </span> <span class="colored-padding"></span></span></div> |
| </div> |
| </body> |
| </html> |