Skip to content

Commit cc2ea29

Browse files
committed
[css-color-4] Move alpha value definition up to opacity property, clarify opacity specified values are not clamped. #8311
1 parent b515ba7 commit cc2ea29

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

css-color-4/Overview.bs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -633,18 +633,34 @@ Transparency: the 'opacity' property
633633
634634

635635
636-
<<alpha-value>>
636+
<dfn dfn-for="opacity"><<alpha-value>>>
637637
638638
The opacity to be applied to the element.
639-
It is interpreted identically to its definition in ''rgb()'',
640-
except that the resulting opacity is applied to the entire element,
639+
The resulting opacity is applied to the entire element,
641640
rather than a particular color.
641+
642+
Opacity values outside the range [0,1] are not invalid,
643+
and a preserved in specified values,
644+
but are clamped to the range [0, 1]
645+
in computed values.
642646
643647

644648
645649
inline-opacity-float-child.html
646650
647651

652+
Opacity in CSS is typically represented using the <> syntax,
653+
for example in the 'opacity' property
654+
or as the [=alpha component=] in a [=color function=].
655+
Represented as a <>, the useful range of the value is ''0''
656+
(representing full transparency)
657+
to ''1''
658+
(representing full opacity).
659+
It can also be written as a <>,
660+
which [=computed value|computes to=]
661+
the equivalent <>
662+
(''0%'' to ''0'', ''100%'' to ''1'').
663+
648664
The 'opacity' property applies the specified opacity to the element as a whole,
649665
including its contents,
650666
rather than applying it to each descendant individually.
@@ -962,25 +978,14 @@ Legacy (Comma-separated) Color Function Syntax
962978
the legacy color syntax is invalid.
963979

964980

965-
Representing Transparency: the <> syntax
981+
Representing Transparency in Colors: the <> syntax
966982

967983
968-
<alpha-value> = <> | <>
984+
dfn-for="color"><alpha-value> = <> | <>
969985
970986

971-
Opacity in CSS is typically represented using the <> syntax,
972-
for example in the 'opacity' property
973-
or as the [=alpha component=] in a [=color function=].
974-
Represented as a <>, the useful range of the value is ''0''
975-
(representing full transparency)
976-
to ''1''
977-
(representing full opacity).
978-
It can also be written as a <>,
979-
which [=computed value|computes to=]
980-
the equivalent <>
981-
(''0%'' to ''0'', ''100%'' to ''1'').
982987
Unless otherwise specified,
983-
an <> component defaults to ''100%'' when omitted.
988+
an <> component of a color defaults to ''100%'' when omitted.
984989
Values outside the range [0,1] are not invalid,
985990
but are clamped to that range at parsed-value time.
986991

0 commit comments

Comments
 (0)