Re: Proposal: content-vertical-alignment - rewording

On Thu, 09 Jun 2005 21:52:39 +0300, Andrew Fedoniouk  
<news@terrainformatica.com> wrote:

>
> "....allow any content in a given element to be centered vertically..."
>
> I suppose it means "allow content in any given element to
> be centered vertically", right?

Yes sorry.. it should be like you say, thanks for the correction.
>
> If, yes, then  first paragraph in
> http://www.w3.org/TR/CSS21/visuren.html#block-formatting
> shall be changed too:

....

> Floats, absolutely positioned elements, inline-blocks, table-cells,
> elements with 'overflow' other than 'visible' <<<and
> elements with 'content-vertical-alignment' other than 'top' and only
> those which have height attribute set explicitly >>> establish
> new block formatting contexts.
>
> etc.

Good point. There might be other places that need tweaking, that I am  
unaware of.

In the light of your remarks, and the need to properly set the rules, here  
is the re-worded version, that may still need some tweaking.
--the reworded proposal--

content-vertical-align:
	value:		top | middle | bottom | <percentage>(?) | inherit
	initial:		top
	applies to:		all
	percentages:	refer to vertical space of the element
				(? allow percentages? see below)
	media:		visual
	computed value:	as specified

This property defines how the content of any given element will be placed  
vertically within the vertical space between padding-top and  
padding-bottom of the element. [I added the padding-top and padding-bottom  
to reduce confusion over whatever box-model is being used, paddings should  
be taken into account. I don't know if the height needs to be mentioned  
tho, because when the content touches the padding-bottom, the  
content-vertical-align calculates nothing different than top anyway.]

	Vertical space mentioned in the following description is referring to the  
space between padding-top and padding-bottom of the element in any box  
model. Content is the content of the element that this property is being  
set. [Margins of the contained elements contribute to the height of the  
content? any ideas?]

	top:
	Default initial value. Top of the content is aligned with the top of  
element's vertical space.

	middle:
	Aligns the vertical center of the content with the center of element's  
vertical space.

	bottom:
	Bottom of the content is aligned with the bottom of the element's  
vertical space.

	<percentage>:
	Aligns the <percentage> of content's vertical size with the same  
<percentage> of element's vertical space, where 0% would be the same as  
top, 50% middle, and 100% bottom.

	Floating elements do not contribute to the calculation of the vertical  
size of the content for setting the vertical position, but they are placed  
along with the content. If there is only a single floating element as the  
content, the top of the floating element should be considered the center  
of the content. The content placement is set as mentioned whatever the  
element's overflow property may be (e.g. if overflow is set to hidden and  
the content is bigger than the element's maximum allowed height, both top  
and bottom of the content is clipped) [I am not sure if handling overflow  
like this is ideal, what do you say, should the UA treat the property as  
"top" if the contents are larger than the element with overflow: hidden?]

-------------------------------------------

I say the percentage also brings nice possibilites to designs. What do you  
think? Any ideas on wording, which I am sure should need improving, and  
other parts that might need changing in the draft?


-- 
Emrah BASKAYA
www.hesido.com

Received on Thursday, 9 June 2005 20:39:09 UTC