HTMLayout %% length units
Strange and wonderful dance Strange and wonderful dance
In short, %% units are "percentage from free space". They also known as flex units or relative length units.
The engine supports two forms of flex units: "spring coil" notation - 100%% and star notation - 1* and these forms are related as:
100%% = 1*
%% units are applicable to border, padding, margin, width and height CSS attributes only. HTMLayout will effectively compute them for all blocks in 'normal' flow. Thus width:100%% of floated block will not be interpreted at all (will be treated as undefined).
Formal definition of %% length units computation:When allotting space among element attributes competing for space along axis, HTMLayout engine allot all values for attributes having other than %% lengths first, then divide up remaining available space among %% lengths. Each %% length receives a portion of the available free space that computed as a percentage from total sum of all %% units along axis. If total sum of all %% lengths along axis is less then 100 then 100%% value is used as a total sum of all %% units. Thus, if 100 pixels of space are available after the user agent allots pixel and percentage space, and the competing relative lengths are 10%%, 20%%, and 70%%, the 10%% will be alloted to 10 pixels, the 20%% will be alloted 20 pixels, and the 70%% will be alloted 70 pixels. If 100 pixels of space are available, and the competing relative lengths are 10%%, 20%%, and 30%%, the 10%% will be alloted to 10 pixels, the 20%% will be alloted 20 pixels, the 30%% will be alloted 30 pixels, and remaining 40 pixels will be left undistributed.
In the example below I am using HTML table to model layout which could be done by %% units without need to use tables. Some %% use cases cannot be reproduced even by HTML tables.
Imagine that four blocks below declared in CSS as:
width:30%% width:70%% width:150px
Below is the same layout but with %% units use. Could be viewed properly only in HTMLayout engine so far:width:100pxwidth:30%%width:70%%width:150px
Two "tables" above have same structure and dimensions of "cells" in HTMLayout engine.
And following example is just one DIV having left and right border set to 30%% and 70%% respectively.border-left:solid tan 30%%; border-right:solid tan 70%%; border-top:solid tan 4px; border-bottom:solid tan 4px; width:50%; background: gold
DIV above takes all available width of its container in HTMLayout engine.
To see examples of %% units alive download HTMLayoutDemo.zip - HTMLayout engine and its demo application with samples.
Super OBSCURE HTML '%%' Length Units
Stomu Yamashta - Go (Full Album) Doug Meet i like my Go album the best, but i lost it! i can't find it anyw...
Bonnie Lee Bakley Semi-Sweet Nude Photo--Let's Not Dream ('70s Psycho Stalker Pop - Leebonny (Private) pressing)weirdopedia 1 second ago '70s Psycho Stalker Pop - Leebonny (Private) pressing. ...
Archived Videos Archived 2005 March April May June July August September October November December 2006 January February Marc...
Jimi Hendrix blows smoke rings! 14 October 1966 from Mauryo Rourk on Vimeo . Jimi Hendrix blows smoke rings! 14 October 1966 ...
Bonnie Lee Bakley "...takes off her blouse and peels down her stockings" while I stuff lonely-hearts letters into envelopesIn 1980, still married to her cousin, Bonnie Lee Bakley moved down south. One day she arrived, uninvited at Jerry Lee's boyho...
You recently posted something that violates Facebook policies, so you're temporarily blocked. The block will be active for 2 hours more. 2.18.18 11:13 PM (Everyone is giving me shit and I can't reply)This Feature is Temporarily Blocked You recently posted something that violates Facebook policies, so you're temporarily bl...
Who is Johnny Dark? ▶ 4:48 https://www.youtube.com/watch?v=Q8thtwjpcxg Mar 21, 2008 - Uploaded by zoomix Johnny Dark ...
Herbert Singleton (1945 - 2007) New Orleans Grave Theft: Nothing's Sacred https://t.co/lHmtLd1yDY andy antippas is the slimiest...
Mrjyn @mrjyn Feb 16 I ...
CSSex A List Apart: Articles: Sliding Doors of CSS CSS_ASP.NET4 | SilverLight4 | MVC2 | 【孟宪会之精彩世界】 【孟宪会之精彩世界】 快捷方式方式 ...