File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
testing/web-platform/tests/css/css-text/white-space Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < title > CSS-white-space test: restore collapsed whitespace</ title >
3
+ < link rel ="
author "
title ="
JoeDow "
href ="
[email protected] "
>
4
+ < link rel ="match " href ="reference/pre-001-ref.html ">
5
+ < link rel ="help " href ="https://drafts.csswg.org/css-text-3/#white-space-property ">
6
+ < link rel ="stylesheet " type ="text/css " href ="/fonts/ahem.css " />
7
+ < style >
8
+ html {
9
+ font : 20 px/1 Ahem;
10
+ }
11
+ .span {
12
+ background-color : blueviolet;
13
+ }
14
+ # target {
15
+ background-color : blue;
16
+ }
17
+ </ style >
18
+ < body >
19
+ < div >
20
+ < span class ="span "> aa bb </ span > < span id ="target "> target </ span > < span class ="span "> bb aa</ span >
21
+ </ div >
22
+
23
+ < script >
24
+ window . onload = function ( ) {
25
+ const target = document . getElementById ( "target" ) ;
26
+ // force layout
27
+ target . offsetLeft ;
28
+ target . style . whiteSpace = "pre" ;
29
+ }
30
+ </ script >
31
+ </ body >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < link rel ="stylesheet " type ="text/css " href ="/fonts/ahem.css " />
3
+ < style >
4
+ html {
5
+ font : 20 px/1 Ahem;
6
+ }
7
+ .span {
8
+ background-color : blueviolet;
9
+ }
10
+ # target {
11
+ background-color : blue;
12
+ white-space : pre;
13
+ }
14
+ </ style >
15
+ < body >
16
+ < div >
17
+ < span class ="span "> aa bb </ span > < span id ="target "> target </ span > < span class ="span "> bb aa</ span >
18
+ </ div >
19
+ </ body >
You can’t perform that action at this time.
0 commit comments