box-shadow-invalid-001.html (1924B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Background and Borders Test: invalid box-shadow declarations</title> 6 7 <!-- 8 9 Created: May 20th 2023 10 11 Last modified: May 20th 2023 12 13 --> 14 15 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 16 <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#box-shadow"> 17 <link rel="match" href="reference/ref-filled-green-100px-square.xht"> 18 19 <meta content="This test checks that 'box-shadow' accepts either the 'none' value or (exclusive or) a comma-separated list of shadows but not both at the same time." name="assert"> 20 <meta content="invalid" name="flags"> 21 22 <!-- 23 24 <shadow> = <color>? && [<length>{2} <length [0,∞]>? <length>?] && inset? 25 26 The box-shadow property attaches one or more drop-shadows to 27 the box. The property accepts either the none value, which 28 indicates no shadows, or a comma-separated list of shadows, 29 ordered front to back. 30 31 --> 32 33 <style> 34 div 35 { 36 background-color: red; 37 box-shadow: green 100px 100px inset; 38 /* 39 This inset 'box-shadow' declaration will paint and cover 40 the inside of the red square. This way, we verify that 41 the UA actually supports 'box-shadow'. 42 */ 43 box-shadow: none, red 0px -100px, red 100px 0px, red 0px 100px, red -100px 0px; /* invalid */ 44 box-shadow: red 0px -100px, none, red 100px 0px, red 0px 100px, red -100px 0px; /* invalid */ 45 box-shadow: red 0px -100px, red 100px 0px, none, red 0px 100px, red -100px 0px; /* invalid */ 46 box-shadow: red 0px -100px, red 100px 0px, red 0px 100px, none, red -100px 0px; /* invalid */ 47 box-shadow: red 0px -100px, red 100px 0px, red 0px 100px, red -100px 0px, none; /* invalid */ 48 height: 100px; 49 width: 100px; 50 } 51 </style> 52 53 <p>Test passes if there is a filled green square and <strong>no red</strong>. 54 55 <div></div>