<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22176</bug_id>
          
          <creation_ts>2013-05-27 11:21:38 +0000</creation_ts>
          <short_desc>Allow scrolls to elements to be positioned at an offset of the viewport</short_desc>
          <delta_ts>2013-08-08 13:28:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM View</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88251</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-05-27 11:21:38 +0000</bug_when>
    <thetext>http://lists.w3.org/Archives/Public/www-style/2013May/0361.html

[[
&gt; Similarly, I&apos;ve seen a lot of the social sites that support j/k style
&gt; navigation between posts do this: plus.google.com and the tumblr feed I&apos;m
&gt; pretty sure do it.

This doesn&apos;t update the URL bar or the history, and wants to scroll an  
element into view, so scrollIntoView() seems like the best fit here.

An issue though is that plus.google.com&apos;s j/k navigation wants to position  
the post under the header, so a normal link doesn&apos;t work, and the current  
scrollIntoView() doesn&apos;t work, either (the post would be positioned behind  
the header).

We could make scrollIntoView() take an argument that supports positioning,  
which has been proposed in  
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17152 but that proposal  
seems suboptimal here where we want &quot;under the header&quot; rather than &quot;X%  
 from the top of the viewport&quot;.

For pages that have a fixed header, I think it would be nice to be able to  
offset navigations/scrolls to elements. For instance, we could introduce  
something like

@viewport { scroll-top-offset: 100px; scroll-left-offset: 50px; }

which would cause both &lt;a href=&quot;#foo&quot;&gt; links and scrollIntoView() to  
scroll to that offset instead of the top of the viewport.

What do people think?
]]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89461</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-18 09:20:28 +0000</bug_when>
    <thetext>This should be aware of vertical writing modes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89467</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-18 09:59:12 +0000</bug_when>
    <thetext>I&apos;d like to see implementor interest before specifying this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>