<?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>29731</bug_id>
          
          <creation_ts>2016-07-15 10:01:46 +0000</creation_ts>
          <short_desc>Add Attribute to Reset the viewport in specific context</short_desc>
          <delta_ts>2017-05-28 09:19:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML.next</product>
          <component>default</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philipp Wrann">philippwrann</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>lwatson</cc>
    
    <cc>mike</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>126956</commentid>
    <comment_count>0</comment_count>
      <attachid>1649</attachid>
    <who name="Philipp Wrann">philippwrann</who>
    <bug_when>2016-07-15 10:01:46 +0000</bug_when>
    <thetext>Created attachment 1649
basic example

I have been thinking about element queries and math-based css selectors to enhance modular web development and presentation of html fragments in different scenarios.

The most simple method (in terms of backwards compatibility and complexity) i came up with is the following approach:

Introduce a new html attribute or css property that can be applied on certain html tags to reset the viewport (base for media query calculations). Once media queries are evaluated the viewport root is used for calculation instead of the screen. As a fallback (height for example) the screen/media will be used.

That way you could style widgets/html fragments for the context they are displayed in (instead of the media they are rendered on).

A css property (like: viewport:reset or media:reset-viewport) or a html attribute (&lt;section resetviewport&gt;&lt;/section&gt;) would be necessary.

I think many other approaches (element query or math-based selectors) to handle the problem of &quot;adaptive layouts&quot; have massive downsides.

let me know what you think about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128614</commentid>
    <comment_count>1</comment_count>
    <who name="Léonie Watson">lwatson</who>
    <bug_when>2017-05-28 09:19:08 +0000</bug_when>
    <thetext>Moved to the HTML repo as issue 938:
https://github.com/w3c/html/issues/938</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1649</attachid>
            <date>2016-07-15 10:01:46 +0000</date>
            <delta_ts>2016-07-15 10:01:46 +0000</delta_ts>
            <desc>basic example</desc>
            <filename>viewport-reset.html</filename>
            <type>text/html</type>
            <size>918</size>
            <attacher name="Philipp Wrann">philippwrann</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIEhUTUw+CjxodG1sPgoJPGhlYWQ+CgkJPHRpdGxlPkZvbzwvdGl0bGU+CgkJPHN0
eWxlPgoJCS52aWV3cG9ydCB7CgkJCXZpZXdwb3J0OnJlc2V0OwoJCX0KCQlAbWVkaWEgc2NyZWVu
IGFuZCAobWluLXdpZHRoOjQwMHB4KSB7CgkJCS53aWRnZXQgewoJCQkJZm9udC1zaXplOiAycmVt
OwoJCQl9CgkJfQoJCTwvc3R5bGU+Cgk8L2hlYWQ+Cgk8Ym9keT4KCQk8YXJ0aWNsZT4KCQkJPGhl
YWRlcj4KCQkJCTxoMT5Gb288L2gxPgoJCQk8L2hlYWRlcj4KCQkJPGRpdiBjbGFzcz0iY29udGVu
dHMiPgoJCQkJPHA+CgkJCQkJc29tZSBjb250ZW50CgkJCQk8L3A+CgkJCQk8ZGl2IGNsYXNzPSJ2
aWV3cG9ydCIgcmVzZXR2aWV3cG9ydD4gP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