@@ -264,47 +264,6 @@ or if ''outline-style/auto'' is specified together with an <<'outline-width'>> v
264
264
but without an explicit <<'outline-style'>> or <<'outline-color'>> value,
265
265
both 'outline-style' and 'outline-color' are set to ''outine-style/auto'' .
266
266
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
-
308
267
The outline created with the outline properties is drawn "over" a box,
309
268
i.e., the outline is always on top
310
269
and doesn't influence the position or size of the box,
@@ -332,10 +291,71 @@ for conveying the concept of focus to the user.
332
291
333
292
Note: This specification does not define the exact position or shape of the outline, but it is typically drawn immediately outside the border box.
334
293
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>
335
341
336
342
The 'outline-width' property accepts
337
343
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>
339
359
340
360
<dfn><<outline-line-style>></dfn> accepts
341
361
the same values as <<line-style>>
@@ -346,6 +366,7 @@ except that
346
366
In addition,
347
367
the 'outline-style' property
348
368
accepts the value ''outline-style/auto'' .
369
+
349
370
The ''outline-style/auto'' value permits the user agent
350
371
to render a custom outline style,
351
372
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)
360
381
User agents may treat ''outline-style/auto'' as
361
382
''outline-style/solid'' .
362
383
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
+
363
397
The 'outline-color' property
364
398
accepts all values of <'border-color' >,
365
399
as well as the following keywords:
@@ -396,42 +430,6 @@ The computed value for ''outline-color/invert'' is ''outline-color/invert''.
396
430
For <<color>> values, see [[css-color-4#resolving-color-values]] in [[!CSS-COLOR-4]] .
397
431
For <<image-1D>> values, see [[css-images-4#stripes]] in [[!CSS-IMAGES-4]] .
398
432
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
-
435
433
<h3 id="outline-offset">Offsetting the Outline: the 'outline-offset' property</h3>
436
434
437
435
By default, the outline is drawn starting just outside the <a>border edge</a> .
0 commit comments