W3C home > Mailing lists > Public > www-style@w3.org > June 2005

Re: Proposal: content-vertical-alignment

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 15 Jun 2005 11:31:26 -0700
Message-ID: <001601c571d8$7121ead0$c302000a@internal.toppro.net>
To: "Ian Hickson" <ian@hixie.ch>
Cc: "David Woolley" <david@djwhome.demon.co.uk>, <www-style@w3.org>


----- Original Message ----- 
From: "Ian Hickson" <ian@hixie.ch>

| On Tue, 14 Jun 2005, Andrew Fedoniouk wrote:
| >
| > I've already published this in the list not once: [...]
|
| This definition is not well-defined.

Agree, it is unformal definition targeted to
be human readable (as a first step of discussion),
Any concrete advices to make it more formal
are highly appreciated.

|For example: what does it mean for a
| length to not be interpreted at all?

Literally (as mentioned): will be treated as undefined.

|What is an "element attribute"?

As mentioned: "%% units are applicable to border, padding, margin, width and 
height CSS
attributes only"

Element attributes (dimensional properties) here are:  border, padding, 
margin, width
and height.

|What does it mean to "compete for space along an axis"? How does this
interact
| with section 10 of 2.1?

%% units are accountible (apply) to dimensional
attibutes (width,height,margins,baddings, borders) of inline-block elements
and block elements in normal flow.

inline-blocks:  horizontal borders, padding, margin and width
with values given in %% units are accountable for computation of
in-line positioning. Width of current line box used as a container width.
Vertical border, padding, margin and height (%% values) are computed
in respect of current line height.

blocks in normal flow:
Vertical border, padding, margin and height (%% values) are
accountible for %% computation in respect of computed heigth of container's
content box.
Horizontal borders, padding, margin and width
with values given in %% units computed with respect to
computed width of the containers content box (as e.g. width:auto).

| What is the computed value of lengths with such
| units?

Definition by example:

span {
 display:inline-block;
 margin-left:50%%; margin-right:50%%; }

<p>one<span>two</span>three</p>

Let's say computed value of width of the paragraph content box
is 100px.  Width of word 'one' (intrinsic width) is 10px ,
Width of 'two' - 12px (intrinsic width), and width of 'three' is 14px,

Sum of all %%s along axis is 50%% + 50%% = 100%% as
content of the paragraph fits in full in one line (width:100px).

Computed value of left and right margins of the span ('two') will be:

(100px - 10px - 12px - 14px) * 50%% / 100%% = 32 px

The final positioning will be as
|one...........two...........three|

Word 'one' will be attached to the left side of paragraph
content box , 'three' to the right side of content box
and 'two' will be placed equidistantly between 'one' and 'three'

Horizontal computation (%% horizontal computation) of inline blocks
happens at the same point as calculation of positioning elements
in paragraphs having text-align:'justify'.

| What is the parsing requirement?

Same as for % units.

| What properties does it apply to?

As mentioned:
"%% units are applicable to border, padding, margin, width and height CSS
attributes only"

|
|
| > From formal point of view "formal" definition at least is not worse than
| > definition of multi-length units in current HTML spec[1].
|
| The HTML4 spec is one of the worst specs _ever_ to have been published by
| the W3C when it comes to conformance criteria. It is _extremely_ badly
| defined and is certainly not a spec to look up to when it comes to looking
| at how to define a CSS unit.

Probably.

HTML and CSS targeted for different auditoriums this is why
they are different.

And neither one of them is ideal.

CSS spec is not formal enough to be considered
as a strict and formal definition.

Example:
reading
http://www.w3.org/TR/CSS21/text.html#alignment-prop
try to design procedure which does text line justification.

"In the case of 'justify', the UA may stretch the
inline boxes in addition to adjusting their positions"

What are "inline boxes" here? And so on.


Andrew Fedoniouk.
http://terrainformatica.com


|
| -- 
| Ian Hickson               U+1047E                )\._.,--....,'``.    fL
| http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
| Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
|
Received on Wednesday, 15 June 2005 18:31:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:37 GMT