grid-gradient-001.html (1000B)
1 <!doctype html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <title>Example of a gradient rule image</title> 7 8 <style> 9 html,body { 10 color:black; background-color:white; font:20px/1 monospace; 11 } 12 13 .grid { 14 display: inline-grid; 15 grid-template-columns: repeat(3, 50px); 16 width: 300px; 17 height: 240px; 18 place-content: space-around; 19 20 column-rule: min(100%, max(16px, 50%)) solid; 21 column-rule-image: linear-gradient(#f008,#fc08); 22 column-rule-align: rule; 23 column-rule-extent: all-long; 24 25 row-rule: min(16px, 100%) solid; 26 row-rule-image: linear-gradient(90deg,#f008,#fc08); 27 row-rule-align: rule; 28 row-rule-extent: long; 29 30 border: 2px solid; 31 margin-right: 15px; 32 margin-bottom: 30px; 33 background: lightgrey; 34 } 35 36 x { 37 block-size: 48px; 38 background: grey; 39 } 40 x:nth-child(2), x:nth-child(6) { 41 grid-column: span 2; 42 } 43 </style> 44 45 <div class="grid test1"><x>1</x><x>2</x><x>3</x><x>4</x><x>5</x><x>6</x><x>7</x></div>