summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-backgrounds/border-radius-clip-001.html
blob: 971bba1a1885f61b5f4bbc4682ee861abc38c470 (plain)
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
<!DOCTYPE html>

  <meta charset="UTF-8">

  <title>CSS Backgrounds and Borders Test: 'border-radius' and corner-clipping of content</title>

  <link rel="author" title="zhouli" href="mailto:liz@oupeng.com">
  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
  <link rel="help" href="http://www.w3.org/TR/css-background-3/#corner-clipping">
  <link rel="match" href="reference/border-radius-clipping-ref.html">

  <meta name="assert" content="Test passes if a box with border-radius that clips its content to a box edge clips to the border-radius curve in the corners.">

  <meta name="fuzzy" content="0-57;0-1552">

  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
  <style>
  body > div { float: left; }
  .round
    {
      border: transparent double 20px;
      border-radius: 50%;
      padding: 10px;
    }
  #bg, #txt, #img-contain
    {
      overflow: hidden;
      width: 80px;
    }
  #bg > div
    {
      margin: -10px;
      background-image: url("support/100x100-green-with-red-corners.png");
      height: 100px;
      width: 100px;
    }
  #txt > div
    {
      margin: -10px;
      color: green;
      font: 50px/1 Ahem;
    }

  img
    {
      display: block;
    }
  #img-contain > img
    {
      margin: -10px;
    }
  #img-self
    {
      margin: -10px;
    }
  </style>

  <p>Test passes if there are four filled green circles and <strong>no red</strong>.

  <div id="bg" class="round">
    <div></div>
  </div>

  <div id="txt" class="round">
    <div>XX<br>XX</div>
  </div>

  <div id="img-contain" class="round">
    <img src="support/swatch-green.png" width=100 height=100>
  </div>

  <div>
    <img id="img-self" class="round" src="support/swatch-green.png" width=100>
  </div>