tor-browser

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

targeted-column-scroll-marker-selection-001-ref.html (2459B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5  <meta charset="utf-8">
      6  <title>CSS Test: scroll tracking for ::scroll-markers whose orignatin elements cannot be scroll-aligned </title>
      7  <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-container-scroll">
      8 </head>
      9 
     10 <body>
     11  <style>
     12    .wrapper {
     13      display: grid;
     14      justify-content: center;
     15    }
     16 
     17    .carousel {
     18      width: 800px;
     19      height: 200px;
     20      overflow-x: scroll;
     21      scroll-snap-type: x mandatory;
     22      list-style-type: none;
     23      scroll-behavior: smooth;
     24      border: solid 2px grey;
     25      padding-top: 10%;
     26      text-align: center;
     27      counter-set: markeridx -1;
     28      columns: 2;
     29 
     30      & > :nth-child(odd)::scroll-marker {
     31        content: counter(markeridx);
     32        counter-increment: markeridx;
     33        align-content: center;
     34        text-align: center;
     35        width: 35px;
     36        height: 35px;
     37        border-radius: 50%;
     38        margin: 3px;
     39        background-color: red;
     40      }
     41      /* item 2 is child 3 */
     42      & > :nth-child(3)::scroll-marker {
     43        background-color: green;
     44      }
     45 
     46      &>.item {
     47        scroll-snap-align: center;
     48        height: 80%;
     49        width: 158px;
     50        border: 1px solid;
     51        place-content: center;
     52        display: inline-block;
     53      }
     54 
     55      scroll-marker-group: after;
     56 
     57      &::scroll-marker-group {
     58        height: 45px;
     59        display: flex;
     60        align-items: center;
     61        justify-content: center;
     62        border: solid 1px black;
     63        border-radius: 30px;
     64      }
     65    }
     66  </style>
     67  <div class="wrapper" id="wrapper">
     68    <div class="carousel" id="carousel">
     69      <div class="item item0" tabindex=0>0</div>
     70      <div class="item item1" tabindex=0>1</div>
     71      <div class="item item2" tabindex=0>2</div>
     72      <div class="item item3" tabindex=0>3</div>
     73      <div class="item item4" tabindex=0>4</div>
     74      <div class="item item5" tabindex=0>5</div>
     75      <div class="item item6" tabindex=0>6</div>
     76      <div class="item item7" tabindex=0>7</div>
     77      <div class="item item8" tabindex=0>8</div>
     78      <div class="item item9" tabindex=0>9</div>
     79      <div class="item item10" tabindex=0>10</div>
     80      <div class="item item11" tabindex=0>11</div>
     81      <div class="item item12" tabindex=0>12</div>
     82      <div class="item item13" tabindex=0>13</div>
     83      <div class="item item14" tabindex=0>14</div>
     84      <div class="item item15" tabindex=0>15</div>
     85    </div>
     86  </div>
     87 </body>
     88 
     89 </html>