diff --git a/css-ui-4/Overview.bs b/css-ui-4/Overview.bs index 833f3b4e068..57783dec62e 100644 --- a/css-ui-4/Overview.bs +++ b/css-ui-4/Overview.bs @@ -1745,7 +1745,7 @@ without adverse consequences to compatibility, so this specification allows flexibility. -

Control Styling

+

Styling Widgets

Switching appearance

@@ -1760,13 +1760,18 @@ Animation type: discrete While the way most elements in a document look can be fully controlled by CSS, -controls are typically rendered by UAs using native UI controls of the host operating system, +widgets are typically rendered by UAs using native UI controls of the host operating system, which can neither be replicated nor styled using CSS. +The term widget in this specification denotes elements that can have native appearance, +meaning that they are rendered like analogous native widgets or controls of the host operating system or platform, +or with a look and feel not otherwise expressible in CSS. +It is up to the host language (e.g., HTML [[HTML]]) to define which elements can have native appearance. + This specification introduces the 'appearance' property to provide some control over this behavior. In particular, using ''appearance: none'' allows authors -to suppress the native style of controls, +to suppress the native appearance of widgets, so that CSS can be used to restyle them.
@@ -1782,16 +1787,16 @@ so that CSS can be used to restyle them. in part because many values applied to pseudo-elements that other browsers don't have, as they construct form elements differently, and which should not be standardized, - since the ability to make for controls look substantially different on different platforms + since the ability to make form controls look substantially different on different platforms should be preserved. - Also, because the ability to turn any arbitrary element (including any form control) + Also, the ability to turn any arbitrary element (including any form control) into any (other) arbitrary form control is considered a misfeature. Instead, the design being specified is based on just having an "auto" value that makes form controls look like whatever they need, - and a "none" value that suppresses "native" look. + and a "none" value that suppresses [=native appearance=]. However, there is evidence that this alone is not web compatible, due in part to uses such as: @@ -1816,17 +1821,16 @@ so that CSS can be used to restyle them.
none
The element is rendered following the usual rules of CSS. - Replaced elements other than controls are not affected by this, + Replaced elements other than widgets are not affected by this, and remain replaced elements. - Controls are not made to look like native controls of the host operating system. + Widgets must not have their native appearance. See [[#appearance-decorative]] and [[#appearance-semantics]] for details.
auto
- UAs may render controls using native controls of the host operating system - or with a look and feel not otherwise expressible in CSS. + Widgets may have their native appearance. - Elements other than controls must be rendered as if ''appearance/none'' had been specified. + Elements other than widgets must be rendered as if ''appearance/none'' had been specified.
button
@@ -1875,8 +1879,7 @@ so that CSS can be used to restyle them. some of these values need to be promoted to being full blown values with effects on arbitrary elements like ''button'', or that - some of these values need to have some side effects on some controls. - + some of these values need to have some side effects on some widgets. @@ -1906,7 +1909,7 @@ so that CSS can be used to restyle them. and activating (for example by clicking) the element would toggle the state as usual. -On controls where the computed value is ''appearance/auto'' or one of the <> values, +On widgets where the computed value is ''appearance/auto'' or one of the <> values, and on any element where the computed value is ''appearance/button'', UAs may disregard some CSS properties to ensure that the intended appearance is preserved, @@ -1935,7 +1938,7 @@ Issue: Are there more properties should include in this list? Should we remove some? Should whitelist the properties that are ok to ignore instead of blacklisting those that are not? -Either way, UAs do ignore some properties when rendering controls, +Either way, UAs do ignore some properties when rendering widgets, so this specification needs to say something about this. For compatibility with legacy content, UAs must also support -webkit-appearance @@ -1944,7 +1947,7 @@ as a [=legacy name alias=] of 'appearance'.

Effects of 'appearance' on Decorative Aspects of Elements

-All decorative visual aspects of a control which are not caused by a CSS style rule +All decorative visual aspects of a widget which are not caused by a CSS style rule must be suppressed when the appearance is changed using 'appearance', even if the UA's internal representation for this element was composed of multiple elements or pseudo elements combined together. @@ -1957,14 +1960,14 @@ was composed of multiple elements or pseudo elements combined together. UAs should include in their User Agent stylesheet style rules -to give controls a recognizable shape when 'appearance' is ''appearance/none''. +to give widgets a recognizable shape when 'appearance' is ''appearance/none''. Note: Authors may therefore need to override these UA style rules to get the styling they intended.
Authors may find it convenient to use ''all: unset'', - to get fully unstyled controls + to get fully unstyled widgets which they can then style as they want without interference from the browser's UA stylesheet. However, this also suppresses the focus indicators provided by the same UA stylesheet. In order avoid damaging accessibility, @@ -1975,16 +1978,16 @@ they intended.

Effects of 'appearance' on Semantic Aspects of Elements

-UAs must preserve aspects of the control -which are necessary to operate the control with its original semantics. +UAs must preserve aspects of the widget +which are necessary to operate the widget with its original semantics. The UA may however give them a different look and feel -as long as it remains possible to operate the control. -Aspects of a control which are merely needed to observe the state the control is in +as long as it remains possible to operate the widget. +Aspects of a widget which are merely needed to observe the state the widget is in and are not needed to operate it should be suppressed as well when the same information can be conveyed using ordinary CSS. Document languages should specify -for each control that they define +for each widget that they define what needs to be preserved.