[css-inline] Computed value for initial-letter property

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[css-inline] Computed value for initial-letter property

Jeremy Chen
Hi,

According to CSS-Inline-3 section 3.3 [1], the computed value of initial-letter property is "as specified". I'm wondering if it would make sense to state the computed value as "none, or a number and an integer" ?


[1] https://drafts.csswg.org/css-inline/#sizing-drop-initials

Jeremy Chen
Software Engineer, Mozilla Corporation
Tel: +886-2-8786-1100 #285
Reply | Threaded
Open this post in threaded view
|

Re: [css-inline] Computed value for initial-letter property

fantasai
On 05/11/2016 06:12 AM, Jeremy Chen wrote:
> Hi,
>
> According to CSS-Inline-3 section 3.3 [1], the computed value of initial-letter property is "as specified". I'm wondering if
> it would make sense to state the computed value as "none, or a number and an integer" ?
>
> [1] https://drafts.csswg.org/css-inline/#sizing-drop-initials

This seems a bit unnecessarily verbose given the current pattern
for the Computed Value lines, which doesn't say anything special
for numbers or integers because they don't involve any computation.

(That said, we should change the way we handle the propdef boxes
overall -- the animation type and computed value type are pretty
much identical, so they should be merged into one field somehow.)

~fantasai

Reply | Threaded
Open this post in threaded view
|

Re: [css-inline] Computed value for initial-letter property

Xidorn Quan-3
On Wed, May 25, 2016, at 08:22 AM, fantasai wrote:

> On 05/11/2016 06:12 AM, Jeremy Chen wrote:
> > Hi,
> >
> > According to CSS-Inline-3 section 3.3 [1], the computed value of initial-letter property is "as specified". I'm wondering if
> > it would make sense to state the computed value as "none, or a number and an integer" ?
> >
> > [1] https://drafts.csswg.org/css-inline/#sizing-drop-initials
>
> This seems a bit unnecessarily verbose given the current pattern
> for the Computed Value lines, which doesn't say anything special
> for numbers or integers because they don't involve any computation.

They do involve computation. The optional <integer> "duplicates the
first argument, floored to the nearest positive whole number" if
omitted, which means to return the value as specified, UA may need to
store extra information whether the optional integer is present or
derived from the first argument, and that information is useless
otherwise.

- Xidorn

Reply | Threaded
Open this post in threaded view
|

Re: [css-inline] Computed value for initial-letter property

Charles Lamont
In reply to this post by fantasai
On 2016-05-24 23:24, fantasai wrote:

> The CSS WG has published an updated Working Draft of the CSS Inline
> Layout Module Level 3
>
> http://www.w3.org/TR/css-inline-3/

> Please review the draft, and send any comments to this mailing list,
> <[hidden email]>, prefixed with [css-inline]

Some time ago I argued a case for an option to set font size for drop
caps which was largely catered for by the use of number rather than
integer for the size of the initial letter, but I don't think the last
case in 3.3 is quite right. Where the initial letter size is less than
the drop, I think that to better model printing with moveable type, it
should align at the top, not the bottom.
--
Charles Lamont