W3C home > Mailing lists > Public > www-style@w3.org > January 2014

HTML Tags expressiveness and regions

From: François REMY <francois.remy.dev@outlook.com>
Date: Mon, 27 Jan 2014 12:01:25 +0100
Message-ID: <DUB404-EAS204B7B2A1D7497334C0219EA5A20@phx.gbl>
To: <www-style@w3.org>
TLDR: In this demo, I show why limiting regions to sibling virtual elements (aka only allow "overflow: fragments") is reducing the expressiveness of the developer:

	<section id="content"><p>

The element sets a new line rhythm. The new baseline rhythm is established by finding the first baseline of the element by using the first available font specified on the 'font-family' property; thereafter the frequency of the rhythm is equal to the used value of 'line-height'. The new line rhythm is used to align the content of the element, including child elements. Child elements may, however, establish their own line rhythm, or indicate that they do not seek alignment with the established line rhythm.


	<!-- ideally, the details tag would be a web component and therefore in the shadow dom -->
	<details id="content-followup">
		<summary>Read more</summary>
		<after-pseudo><!-- to make the demo work right now since ::after support looks wip --></after-pseudo>

	<!-- css code -->
	<style type="text/css">

body {
    width: 320px;
    text-align: justify;

#content {
    max-height: 100px;
    -webkit-flow-from: article;
    -webkit-region-fragment: break;
    text-overflow: ellipsis; // would need spec upgrade though
#content > * {
    -webkit-flow-into: article;

#content-followup > summary { font-weight: bold; }
#content-followup[open] > summary { opacity: 0.25; }
#content-followup > after-pseudo {
    -webkit-flow-from: article;

//and layout tweaks


// and maybe scripting stuff to hide the <details> tag whenever the #content region switch to the "fit" state (aka no content in the ::after pseudo), by listening to region events, if content is expected to eve fit.
Received on Monday, 27 January 2014 11:02:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:39 UTC