This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29731 - Add Attribute to Reset the viewport in specific context
Summary: Add Attribute to Reset the viewport in specific context
Status: RESOLVED MOVED
Alias: None
Product: HTML.next
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-15 10:01 UTC by Philipp Wrann
Modified: 2017-05-28 09:19 UTC (History)
3 users (show)

See Also:


Attachments
basic example (918 bytes, text/html)
2016-07-15 10:01 UTC, Philipp Wrann
Details

Description Philipp Wrann 2016-07-15 10:01:46 UTC
Created attachment 1649 [details]
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 (<section resetviewport></section>) would be necessary.

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

let me know what you think about this.
Comment 1 LĂ©onie Watson 2017-05-28 09:19:08 UTC
Moved to the HTML repo as issue 938:
https://github.com/w3c/html/issues/938