border-image-shorthand-002.htm (2048B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Background and Borders Test: Omitted values for 'border-image-outset' property in the 'border-image' shorthand</title> 6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/"> 7 <!-- 8 Test rehabilitated by Gérard Talbot 9 2020-05-27 and 2020-06-25 and 2020-09-25 10 --> 11 <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#the-border-image"> 12 <link rel="match" href="reference/border-image-shorthand-002-ref.html"> 13 <meta name="assert" content="This test checks that the omitted 'border-image-outset' value in the shorthand property is set to the initial value."> 14 <style> 15 div 16 { 17 border-color: red; 18 border-style: double; 19 border-width: 20px; 20 height: 100px; 21 margin: 50px; 22 width: 100px; 23 } 24 25 #test 26 { 27 /* We first set border-image-outset to an entirely arbitrary value */ 28 border-image-outset: 2; 29 /* 30 and then we check with a shorthand value (which is deliberately 31 omitting the border-image-outset sub-property) if the border-image-outset 32 sub-property gets reset to its initial default value 33 (which is 0 and not 2) 34 */ 35 border-image: url("support/9grid40-30-20-10-red-old.png") 40% 15% 20% 5% / 1 stretch; 36 } 37 38 #reference 39 { 40 border-image-outset: 0 0 0 0; 41 border-image-repeat: stretch; 42 border-image-slice: 40% 15% 20% 5%; 43 border-image-source: url("support/9grid40-30-20-10-red-old.png"); 44 border-image-width: 1; 45 } 46 </style> 47 48 <p>Test passes if there are 2 identical green squares and <strong>no red</strong>. 49 <div id="test"></div> 50 <div id="reference"></div>