This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
/
border-radius-tests.html
150 lines (126 loc) · 7.95 KB
/
border-radius-tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>Test cases for border-radius</title>
<style type="text/css">
html { -pie-load-path: "../build"; }
body {
font-size: 12px;
}
#tests {
padding: 2em;
}
#tests div {
width: 50%;
padding: 1.5em;
margin: 1em 0;
white-space: pre;
behavior: url(../build/PIE.htc);
position: relative;
background: #CCF;
}
</style>
</head>
<body>
<h1>Tests for border-radius</h1>
<div id="tests">
<h2>Uniform</h2>
<div>border-radius: 10px;</div>
<div>border-radius: 1em;</div>
<div>border-radius: 20%;</div>
<h2>Different per corner</h2>
<div>border-radius: 5px 10px 15px 20px;</div>
<div>border-radius: 0.5em 1em 1.5em 2em;</div>
<div>border-radius: 10% 20% 30% 40%;</div>
<h2>Single corner</h2>
<div>border-radius: 20px 0 0 0;</div>
<div>border-radius: 0 20px 0 0;</div>
<div>border-radius: 0 0 20px 0;</div>
<div>border-radius: 0 0 0 20px;</div>
<h2>X and Y</h2>
<div>border-radius: 30px / 10px;</div>
<div>border-radius: 3em / 1em;</div>
<div>border-radius: 20% / 50%;</div>
<div>border-radius: 5px 10px 15px 20px / 20px 15px 10px 5px;</div>
<h2>Uniform with border</h2>
<div>border-radius: 10px; border: 5px solid #000;</div>
<div>border-radius: 10px; border: 5px dotted #000;</div>
<div>border-radius: 10px; border: 5px dashed #000;</div>
<div>border-radius: 10px; border: 5px double #000;</div>
<div>border-radius: 10px; border: 5px groove #000;</div>
<div>border-radius: 10px; border: 5px ridge #000;</div>
<div>border-radius: 10px; border: 5px inset #000;</div>
<div>border-radius: 10px; border: 5px outset #000;</div>
<h2>Differing border widths</h2>
<div>border-radius: 10px; border: solid #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: dotted #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: dashed #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: double #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: groove #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: ridge #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: inset #000; border-width: 6px 9px 6px 3px;</div>
<div>border-radius: 10px; border: outset #000; border-width: 6px 9px 6px 3px;</div>
<h2>Border thicker than radius</h2>
<div>border-radius: 10px; border: 20px solid #000;</div>
<div>border-radius: 10px; border: 20px dotted #000;</div>
<div>border-radius: 10px; border: 20px dashed #000;</div>
<div>border-radius: 10px; border: 20px double #000;</div>
<div>border-radius: 10px; border: solid #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: dotted #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: dashed #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: double #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: groove #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: ridge #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: inset #000; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: outset #000; border-width: 3px 20px 9px 15px;</div>
<h2>Zero-width borders</h2>
<div>border-radius: 10px; border: 20px solid #000; border-top-width: 0;</div>
<div>border-radius: 10px; border: 20px dotted #000; border-right-width: 0;</div>
<div>border-radius: 10px; border: 20px dashed #000; border-bottom-width: 0;</div>
<div>border-radius: 10px; border: 20px double #000; border-left-width: 0;</div>
<div>border-radius: 10px; border: 20px groove #000; border-top-width: 0;</div>
<div>border-radius: 10px; border: 20px ridge #000; border-right-width: 0;</div>
<div>border-radius: 10px; border: 20px inset #000; border-bottom-width: 0;</div>
<div>border-radius: 10px; border: 20px outset #000; border-left-width: 0;</div>
<h2>Differing border colors</h2>
<div>border-radius: 10px; border: 20px solid; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px dotted; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px dashed; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px double; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px groove; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px ridge; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px inset; border-color: red green blue orange;</div>
<div>border-radius: 10px; border: 20px outset; border-color: red green blue orange;</div>
<h2>Differing border colors and styles</h2>
<div>border-radius: 10px; border: 20px; border-color: red green blue orange; border-style: solid dotted dashed double;</div>
<div>border-radius: 10px; border: 20px; border-color: red green blue orange; border-style: groove ridge inset outset;</div>
<h2>Differing border colors and widths</h2>
<div>border-radius: 10px; border: solid; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: dotted; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: dashed; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: double; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: groove; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: ridge; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: inset; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border: outset; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<h2>Differing border colors, styles, and widths</h2>
<div>border-radius: 10px; border-style: solid dotted dashed double; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<div>border-radius: 10px; border-style: groove ridge inset outset; border-color: red green blue orange; border-width: 3px 20px 9px 15px;</div>
<h2>Arrow-ish</h2>
<div>width: 0; height: 0; padding: 0; background: none; border-radius: 5px; border: 20px solid transparent; border-top-color: blue;</div>
<div>width: 0; height: 0; padding: 0; background: none; border-radius: 5px; border: 20px solid transparent; border-right-color: blue;</div>
<div>width: 0; height: 0; padding: 0; background: none; border-radius: 5px; border: 20px solid transparent; border-bottom-color: blue;</div>
<div>width: 0; height: 0; padding: 0; background: none; border-radius: 5px; border: 20px solid transparent; border-left-color: blue;</div>
</div>
<script type="text/javascript">
(function() {
var divs= document.getElementById("tests").getElementsByTagName("div"),
i = 0, len = divs.length, css;
for(; i < len; i++) {
divs[i].style.cssText += divs[i].firstChild.nodeValue;
}
})();
</script>
</body>
</html>