font-148.xht (1062B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Font shorthand using calc() value for font-size</title> 5 <link rel="author" title="Ondřej Žára" href="https://ondras.zarovi.cz/" /> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-prop" /> 7 <link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-notation" /> 8 <link rel="match" href="font-148-ref.xht"/> 9 <meta name="assert" content="The 'font' shorthand property accepts and sets font-variant, font-size and font-family." /> 10 <style type="text/css"> 11 div { 12 font: 10px sans-serif; 13 } 14 span { 15 font: calc(10 * 10px) sans-serif; 16 } 17 </style> 18 </head> 19 <body> 20 <p>Test passes if letters "def" below are larger than "abc" and "ghi".</p> 21 <div>abc<span class="test">def</span>ghi</div> 22 </body> 23 </html>