Skip to content

Commit 9f71e7d

Browse files
committed
[css-inline-3] Add raise/drop keywords as syntactic sugar for '1' / omitted drop values. #2955
1 parent e7675c6 commit 9f71e7d

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

css-inline-3/Overview.bs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ Creating Initial Letters: the 'initial-letters' property</h3>
613613

614614
<pre class="propdef">
615615
Name: <dfn id="propdef-initial-letters">initial-letters</dfn>
616-
Value: normal | [<<number>> <<integer>>?]
616+
Value: normal | <<number>> <<integer>> | <<number>> && [ drop | raise ]?
617617
Initial: normal
618618
Applies to: certain inline-level boxes and <css>::first-letter</css> and inside <css>::marker</css> boxes (<a href="#first-most-inline-level">see prose</a>)
619619
Inherited: no
@@ -625,7 +625,8 @@ Creating Initial Letters: the 'initial-letters' property</h3>
625625
ISSUE: Renaming this property (and the others in this section)
626626
is currently <a href="https://github.com/w3c/csswg-drafts/issues/2950">under discussion</a>.
627627

628-
This property specifies styling for dropped, raised, and sunken initial letters.
628+
This property specifies styling for dropped, raised, and sunken initial letters
629+
by specifying their <a lt="initial letter size">size</a> and <a lt="initial letter sink">sink</a>.
629630
It takes the following values:
630631

631632
<dl dfn-for=initial-letters dfn-type=value>
@@ -648,10 +649,21 @@ Creating Initial Letters: the 'initial-letters' property</h3>
648649
A value of ''1'' indicates a <a>raised initial</a>;
649650
values greater than ''1'' indiciate a <a>sunken initial</a>.
650651
Values less than one are invalid.
651-
If omitted, it duplicates the first argument,
652+
653+
<dt><dfn>raise</dfn>
654+
<dd>
655+
Computes to an <a>initial letter sink</a> of ''1''.
656+
657+
<dt><dfn>drop</dfn>
658+
<dd>
659+
Computes to an <a>initial letter sink</a>
660+
equal to the <a>initial letter size</a>
652661
floored to the nearest positive whole number.
653662
</dl>
654663

664+
If the <a>initial letter sink</a> value is omitted,
665+
''drop'' is assumed.
666+
655667
An <dfn lt="initial letter | initial letter box">initial letter</dfn> is
656668
an <a>in-flow</a> box
657669
to which 'initial-letters' applies and is not ''initial-letters/normal'';
@@ -662,7 +674,9 @@ Creating Initial Letters: the 'initial-letters' property</h3>
662674

663675
<dl>
664676
<dt>''initial-letters: 3''
665-
<dt>(''initial-letters: 3 3'')
677+
<dt>''initial-letters: 3 3''
678+
<dt>''initial-letters: 3 drop''
679+
<dt>''initial-letters: drop 3''
666680
<dd>
667681
Represents a <a>dropped initial</a> 3 lines high, 3 lines deep.
668682

@@ -677,6 +691,8 @@ Creating Initial Letters: the 'initial-letters' property</h3>
677691
alt="3 lines high, 2 lines deep">
678692

679693
<dt>''initial-letters: 3 1''
694+
<dt>''initial-letters: 3 raise''
695+
<dt>''initial-letters: raise 3''
680696
<dd>
681697
Represents a <a>raised initial</a> 3 lines high, 1 line deep.
682698

0 commit comments

Comments
 (0)