tor-browser

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

right-offset-position-fixed-001.xht (1890B)


      1 <!DOCTYPE html>
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3   <head>
      4     <title>CSS Test: right:auto offset of position:fixed box in an RTL position:relative containing block</title>
      5     <link rel="author" title="Chris Rebert" href="http://chrisrebert.com" />
      6     <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-09-17 -->
      7     <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" title="9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'" />
      8     <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
      9     <link rel="help" href="https://drafts.csswg.org/css2/visuren.html#position-props" />
     10     <link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
     11     <link rel="match" href="right-offset-position-fixed-001-ref.xht" />
     12     <meta name="assert" content="The 'right' box offset property, for fixed positioning, when set to 'auto' specifies the offset of the box from its 'static-position containing block'. Here, in this test, the 'static-position containing block' is #shifted-column and the containing block for #red is established by the viewport." />
     13     <style type="text/css">
     14 html {
     15   direction: rtl;
     16 }
     17 p {
     18   direction: ltr;
     19 }
     20 #shifted-column {
     21     right: 50%;
     22     width: 50%;
     23     position: relative;
     24 }
     25 .square {
     26   width: 100px;
     27   height: 100px;
     28 }
     29 #red {
     30   background-color: red;
     31   position: fixed;
     32   right: auto;
     33 }
     34 #green {
     35   background-color: green;
     36   position: absolute;
     37   right: 50%;
     38 }
     39     </style>
     40   </head>
     41   <body>
     42     <p>Test passes if there is a solid green square and <strong>no red</strong>.</p>
     43 
     44     <div id="shifted-column">
     45       <div id="red" class="square"></div>
     46     </div>
     47     <div id="green" class="square"></div>
     48   </body>
     49 </html>