Skip to content

Commit c24c562

Browse files
committed
[css-ui-4] Editorial: move text around
This puts the general discussion of outlines under the definition of the outline shorthand property, and discussion of the effects of the longhands under the specific longhands.
1 parent 17e16ba commit c24c562

File tree

1 file changed

+76
-78
lines changed

1 file changed

+76
-78
lines changed

css-ui-4/Overview.bs

Lines changed: 76 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -264,47 +264,6 @@ or if ''outline-style/auto'' is specified together with an <<'outline-width'>> v
264264
but without an explicit <<'outline-style'>> or <<'outline-color'>> value,
265265
both 'outline-style' and 'outline-color' are set to ''outine-style/auto''.
266266

267-
<h3 id="outline-width">Outline Thickness: the 'outline-width' property</h3>
268-
269-
<pre class="propdef">
270-
Name: outline-width
271-
Value: <<line-width>>
272-
Initial: medium
273-
Applies to: all elements
274-
Inherited: no
275-
Percentages: N/A
276-
Computed value: absolute length, [=snapped as a border width=]; ''0'' if the outline style is ''border-style/none''.
277-
Animation type: by computed value
278-
</pre>
279-
280-
281-
<h3 id="outline-style">Outline Patterns: the 'outline-style' property</h3>
282-
283-
<pre class="propdef">
284-
Name: outline-style
285-
Value: auto | <<outline-line-style>>
286-
Initial: none
287-
Applies to: all elements
288-
Inherited: no
289-
Percentages: N/A
290-
Computed value: specified keyword
291-
Animation type: by computed value
292-
</pre>
293-
294-
295-
<h3 id="outline-color">Outline Colors: the 'outline-color' property</h3>
296-
297-
<pre class="propdef">
298-
Name: outline-color
299-
Value: auto | [ <<color>> | <<image-1D>> ] | invert
300-
Initial: auto
301-
Applies to: all elements
302-
Inherited: no
303-
Percentages: N/A
304-
Computed value: see below
305-
Animation type: by computed value
306-
</pre>
307-
308267
The outline created with the outline properties is drawn "over" a box,
309268
i.e., the outline is always on top
310269
and doesn't influence the position or size of the box,
@@ -332,10 +291,71 @@ for conveying the concept of focus to the user.
332291

333292
Note: This specification does not define the exact position or shape of the outline, but it is typically drawn immediately outside the border box.
334293

294+
Note: The outline is the same on all sides.
295+
In contrast to borders,
296+
there are no ''outline-top'', ''outline-left'', etc. properties.
297+
298+
This specification does not define how multiple overlapping outlines are drawn
299+
or how outlines are drawn for boxes that are partially obscured behind other elements.
300+
301+
<div class="example">
302+
Here's an example of drawing a thick outline around a BUTTON element:
303+
<pre><code class="lang-css">
304+
button { outline: thick solid }
305+
</code></pre>
306+
</div>
307+
308+
Graphical user interfaces may use outlines around elements
309+
to tell the user which element on the page has the focus.
310+
These outlines are shown in addition to any borders,
311+
and switching outlines on and off should not cause the document to reflow.
312+
The focus is the subject of user interaction in a document
313+
(e.g. for entering text or selecting a button).
314+
315+
<div class="example">
316+
For example, to draw a thick black line around an element when it has the focus,
317+
and a thick red line when it is active,
318+
the following rules can be used:
319+
<pre><code class="lang-css">
320+
:focus { outline: thick solid black }
321+
:active { outline: thick solid red }
322+
</code></pre>
323+
</div>
324+
325+
Note: Since the outline does not affect formatting
326+
(i.e., no space is left for it in the box model),
327+
it may well overlap other elements on the page.
328+
329+
<h3 id="outline-width">Outline Thickness: the 'outline-width' property</h3>
330+
331+
<pre class="propdef">
332+
Name: outline-width
333+
Value: <<line-width>>
334+
Initial: medium
335+
Applies to: all elements
336+
Inherited: no
337+
Percentages: N/A
338+
Computed value: absolute length, [=snapped as a border width=]; ''0'' if the outline style is ''border-style/none''.
339+
Animation type: by computed value
340+
</pre>
335341

336342
The 'outline-width' property accepts
337343
the same values as 'border-width'
338-
([[css-backgrounds-3#border-width]]).
344+
([[css-backgrounds-3#border-width]]),
345+
with the same meaning.
346+
347+
<h3 id="outline-style">Outline Patterns: the 'outline-style' property</h3>
348+
349+
<pre class="propdef">
350+
Name: outline-style
351+
Value: auto | <<outline-line-style>>
352+
Initial: none
353+
Applies to: all elements
354+
Inherited: no
355+
Percentages: N/A
356+
Computed value: specified keyword
357+
Animation type: by computed value
358+
</pre>
339359

340360
<dfn><<outline-line-style>></dfn> accepts
341361
the same values as <<line-style>>
@@ -346,6 +366,7 @@ except that
346366
In addition,
347367
the 'outline-style' property
348368
accepts the value ''outline-style/auto''.
369+
349370
The ''outline-style/auto'' value permits the user agent
350371
to render a custom outline style,
351372
typically a style which is either a user interface default for the platform,
@@ -360,6 +381,19 @@ but this specification does not define how the rendering is impacted (if at all)
360381
User agents may treat ''outline-style/auto'' as
361382
''outline-style/solid''.
362383

384+
<h3 id="outline-color">Outline Colors: the 'outline-color' property</h3>
385+
386+
<pre class="propdef">
387+
Name: outline-color
388+
Value: auto | [ <<color>> | <<image-1D>> ] | invert
389+
Initial: auto
390+
Applies to: all elements
391+
Inherited: no
392+
Percentages: N/A
393+
Computed value: see below
394+
Animation type: by computed value
395+
</pre>
396+
363397
The 'outline-color' property
364398
accepts all values of <'border-color'>,
365399
as well as the following keywords:
@@ -396,42 +430,6 @@ The computed value for ''outline-color/invert'' is ''outline-color/invert''.
396430
For <<color>> values, see [[css-color-4#resolving-color-values]] in [[!CSS-COLOR-4]].
397431
For <<image-1D>> values, see [[css-images-4#stripes]] in [[!CSS-IMAGES-4]].
398432

399-
Note: The outline is the same on all sides.
400-
In contrast to borders,
401-
there are no ''outline-top'', ''outline-left'', etc. properties.
402-
403-
This specification does not define how multiple overlapping outlines are drawn
404-
or how outlines are drawn for boxes that are partially obscured behind other elements.
405-
406-
<div class="example">
407-
Here's an example of drawing a thick outline around a BUTTON element:
408-
<pre><code class="lang-css">
409-
button { outline: thick solid }
410-
</code></pre>
411-
</div>
412-
413-
Graphical user interfaces may use outlines around elements
414-
to tell the user which element on the page has the focus.
415-
These outlines are shown in addition to any borders,
416-
and switching outlines on and off should not cause the document to reflow.
417-
The focus is the subject of user interaction in a document
418-
(e.g. for entering text or selecting a button).
419-
420-
<div class="example">
421-
For example, to draw a thick black line around an element when it has the focus,
422-
and a thick red line when it is active,
423-
the following rules can be used:
424-
<pre><code class="lang-css">
425-
:focus { outline: thick solid black }
426-
:active { outline: thick solid red }
427-
</code></pre>
428-
</div>
429-
430-
Note: Since the outline does not affect formatting
431-
(i.e., no space is left for it in the box model),
432-
it may well overlap other elements on the page.
433-
434-
435433
<h3 id="outline-offset">Offsetting the Outline: the 'outline-offset' property</h3>
436434

437435
By default, the outline is drawn starting just outside the <a>border edge</a>.

0 commit comments

Comments
 (0)