tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

overconstrained-rel-pos-rtl-left-right-vlr-009.xht (3127B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      2 
      3 <html xmlns="http://www.w3.org/1999/xhtml">
      4 
      5  <head>
      6 
      7   <title>CSS Writing Modes Test: over-constrained relatively positioned element - 'direction: rtl' and 'left' and 'right' are not 'auto' in vertical-lr context</title>
      8 
      9   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
     10   <!--
     11   Credits should go to Aleks Totić for reporting
     12   Issue 695270: overconstrained position:relative in vertical-xx is not in compliance with spec
     13   https://bugs.chromium.org/p/chromium/issues/detail?id=695270
     14   and for providing an excellent test originally demonstrating the particular feature
     15   being checked in this test.
     16   -->
     17   <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
     18   <link rel="match" href="overconstrained-rel-pos-rtl-left-right-vlr-009-ref.xht" />
     19 
     20   <meta name="flags" content="image" />
     21   <meta name="assert" content="When a relatively positioned element's 'direction' is 'rtl' and its 'left' and 'right' are not 'auto' in a vertical-lr context, then the value of 'right' wins and 'left' becomes -'right'." />
     22 
     23   <meta name="DC.date.created" content="2017-02-23T09:54:03+11:00" scheme="W3CDTF" />
     24   <meta name="DC.date.modified" content="2017-02-28T09:54:03+11:00" scheme="W3CDTF" />
     25 
     26   <style type="text/css"><![CDATA[
     27   html
     28     {
     29       background: transparent url("support/bg-red-low-left-corn-320x320.png") no-repeat 358px calc(100% - 8px);
     30       /*
     31         16px : p's margin-right
     32        246px : img's width
     33         16px : p's margin-left
     34         80px : since we would need a bg-red which would be in 4th row
     35                and 2nd column (and not in 1st column)
     36       ========
     37        358px : background-position from the right edge of document box
     38       */
     39 
     40       /* top = 8px since the red fail square is already on 4th row in bg-red-low-left-corn-320x320.png */
     41 
     42       direction: rtl;
     43       writing-mode: vertical-lr;
     44     }
     45 
     46 /*
     47 Layout calculation rules (such as those in CSS2.1, Section 9.4.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
     48 
     49 So here, left and right offset properties are input into the §9.4.3 algorithms where left offset property refer to top offset property in the layout rules and where right offset property refer to bottom offset property in the layout rules.
     50 */
     51 
     52   div
     53     {
     54       background-color: green;
     55       left: 80px;
     56       height: 80px;
     57       position: relative;
     58       right: 80px;
     59       width: 80px;
     60     }
     61 
     62   /*
     63   Here, 'left' should win, 'right' should be ignored and the used right value should become -'left'.
     64   */
     65   ]]></style>
     66 
     67  </head>
     68 
     69  <body>
     70 
     71   <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
     72 
     73   <!--
     74   The image says:
     75   Test passes if there is a filled
     76   green square and <strong>no red</strong>.
     77   -->
     78 
     79   <div></div>
     80 
     81  </body>
     82 </html>