Skip to content

Commit f1ecf21

Browse files
committed
[css-inline-3] Add baseline-preference property, naming 'baseline-source' for now. #861 <https://lists.w3.org/Archives/Public/www-style/2019May/0011.html>
1 parent 7934050 commit f1ecf21

File tree

1 file changed

+40
-11
lines changed

1 file changed

+40
-11
lines changed

css-inline-3/Overview.bs

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,29 +155,58 @@ Transverse Box Alignment: the 'vertical-align' property</h3>
155155

156156
<pre class="propdef shorthand">
157157
Name: vertical-align
158-
Value: <<'baseline-shift'>> || <<'alignment-baseline'>>
158+
Value: <<'baseline-source'>> || <<'baseline-shift'>> || <<'alignment-baseline'>>
159159
Initial: baseline
160160
Applies to: inline-level boxes
161161
Inherited: no
162162
Percentages: N/A
163163
</pre>
164164

165-
<p>This shorthand property specifies how an inline-level box is aligned within the line.
165+
<p>This <a>shorthand</a> property specifies
166+
how an inline-level box is aligned within the line.
166167
Values are the same as for its longhand properties, see below.
167168

168169
<p class="advisement">
169-
Authors should use this property ('vertical-align') instead of its longhands.
170+
Authors should use this property ('vertical-align') instead of its longhands
171+
(unless it is specifically needed to cascade its longhands independently).
170172

171-
ISSUE: This property will gain ''first'' and ''last'' keywords,
172-
like in the <a href="https://www.w3.org/TR/css-align-3/">box alignment properties</a>,
173-
see [[css-align-3#baseline-values]].
174-
The <a href="https://github.com/w3c/csswg-drafts/issues/861">open question</a>
175-
is whether they should be added to 'alignment-baseline'
176-
or a new <a>sub-property</a> should be created
177-
to hold the ''first | last'' preference.
173+
<h4 id="baseline-source">
174+
Alignment Baseline Source: the 'baseline-source' longhand</h4>
175+
176+
<pre class="propdef">
177+
Name: baseline-source
178+
Value: auto | first | last
179+
Initial: auto
180+
Applies to: inline-level boxes
181+
Inherited: no
182+
Percentages: N/A
183+
Computed value: specified keyword
184+
Animation type: discrete
185+
</pre>
186+
187+
ISSUE: This is a rough draft, not ready for implementation. Also might rename stuff.
188+
189+
When an inline-level box
190+
has more than one possible source for baseline information
191+
(such as for a multi-line inline block or inline flex container)
192+
this property specifies whether the <a>first baseline set</a> or <a>last baseline set</a>
193+
is preferred for alignment.
194+
Values have the following meanings:
195+
196+
<dl dfn-for=alignment-baseline dfn-type=value>
197+
<dt><dfn>auto</dfn>
198+
<dd>Specifies <a>last-baseline alignment</a> for ''inline-block'',
199+
<a>first-baseline alignment</a> for everything else.
200+
201+
<dt><dfn>first</dfn>
202+
<dd>Specifies <a>first-baseline alignment</a>.
203+
204+
<dt><dfn>last</dfn>
205+
<dd>Specifies <a>last-baseline alignment</a>.
206+
</dl>
178207

179208
<h4 id="alignment-baseline-property">
180-
Alignment Point: 'alignment-baseline' longhand</h4>
209+
Alignment Baseline Type: the 'alignment-baseline' longhand</h4>
181210

182211
<pre class="propdef">
183212
Name: alignment-baseline

0 commit comments

Comments
 (0)