Skip to content

Commit 733983d

Browse files
committed
[css3-ui] pending edits applied for numerous resolved and editorial issues.
1 parent b818837 commit 733983d

2 files changed

Lines changed: 1091 additions & 396 deletions

File tree

css-ui/Overview.bs

Lines changed: 68 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ Abstract: This specification describes user interface related selectors,
2222
Deadline: 2012-02-14
2323
Link Defaults: css-color-3 (property) color
2424
Link Defaults: selectors-4 (selector) :indeterminate
25+
Ignored Terms: style
26+
Ignored Terms: text
27+
Ignored Terms: default
2528
Ignored Terms: outline-top
2629
Ignored Terms: outline-left
2730
Ignored Terms: nav-index
2831
Ignored Terms: ime-mode
2932
Ignored Terms: icon
30-
At Risk: ::value ::choices pseudo-elements
3133
At Risk: 'box-sizing' property value: padding-box
3234
At Risk: 'caret-color' property
3335
At Risk: 'text-overflow' property value: <<string>>
@@ -41,10 +43,6 @@ At risk due to only one implementation:
4143
<li>box-sizing: padding-box - only FF supports in prefixed version
4244

4345
Not at risk:
44-
<li>CSS2.1: :hover :active :focus
45-
<li>Selectors: :enabled :disabled :checked
46-
<li>:indeterminate implemented by FF3.6, IE9, Opera 10.6, Saf3
47-
4846
<li>box-sizing implemented by IE5/Mac, Opera
4947
-moz-box-sizing implemented by Mozilla
5048

@@ -75,19 +73,15 @@ implemented by Opera/Presto desktop with "shift+arrow", and Blink, as well as Sa
7573

7674
<h2 id="intro">Introduction</h2>
7775

78-
This module describes selectors and CSS properties which enable authors
79-
to style user interface related states, element fragments, properties
80-
and values.
76+
This module describes CSS properties which enable authors
77+
to style user interface related properties and values.
8178

8279
<a href="http://www.w3.org/TR/REC-CSS1#anchor-pseudo-classes">Section 2.1 of CSS1</a> [[CSS1]]
8380
and <a href="http://www.w3.org/TR/CSS2/ui.html">Chapter 18 of CSS2</a> [[CSS2]]
84-
introduced several user interface related pseudo-classes, properties and values.
85-
<a href="http://www.w3.org/TR/css3-selectors/#UIstates">Section 6.6.4 of Selectors</a> [[!SELECT]] also describes several additional user interface related pseudo-classes (and one pseudo-element). <a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">User Interface for CSS3 (16 February 2000)</a> introduced several new user interface related features.
81+
introduced several user interface related properties and values.
82+
<a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">User Interface for CSS3 (16 February 2000)</a> introduced several new user interface related features.
8683

87-
This Working Draft incorporates and extends them to provide the ability, through CSS,
88-
to style elements based upon additional user interface states,
89-
to style fragments of user interface elements, and to alter the
90-
dynamic presentation of elements in ways previously only available through specific HTML elements and attributes.
84+
This Working Draft incorporates, extends, and supersedes them.
9185

9286
<h3 id="purpose">Purpose</h3>
9387

@@ -114,49 +108,6 @@ of Cascading Style Sheets, level 2, revision 1 [[CSS21]]
114108
<li><a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">User Interface for CSS3 (16 February 2000)</a> [[CSSUI]]
115109
</ul>
116110

117-
<h2 id="selectors">User Interface Selectors</h2>
118-
119-
<h3 id="pseudo-elements">User interface element fragments: pseudo-elements</h3>
120-
121-
This specification introduces two new pseudo-elements
122-
to provide access to additional user interface element fragments.
123-
<ul>
124-
<li>::value
125-
<li>::choices
126-
</ul>
127-
128-
Note: The ::value and ::choices
129-
pseudo-elements are at risk.
130-
131-
<h4 id="pseudo-value">::value</h4>
132-
133-
A form element may contain both a label for its data value,
134-
and the data value itself.
135-
For such elements, the ::value pseudo-element
136-
selects the representation of just the data value itself,
137-
in order to style its appearance.
138-
139-
The ''::value'' pseudo-element is similar to an inline-level element,
140-
but with certain restrictions.
141-
The following properties apply to ''::value''
142-
pseudo-element: font properties, color property, background properties,
143-
'word-spacing', 'letter-spacing', 'text-decoration', 'vertical-align',
144-
'text-transform', 'line-height'. UAs may apply other properties as well.
145-
146-
147-
<h4 id="pseudo-choices">::choices</h4>
148-
149-
Similarly, a form element which represents a list of options
150-
may contain both a label for the list,
151-
and the list of choices itself.
152-
For such elements,
153-
the ''::choices'' pseudo-element selects
154-
the representation of just the list of choices themselves,
155-
in order to style their appearance.
156-
157-
A list of radio buttons can also be selected with the ''::choices'' pseudo-element,
158-
and the currently chosen radio button can be selected with the ''::value'' pseudo-element.
159-
160111
<h2 id="box-model">Box Model addition</h2>
161112

162113
<h3 id="box-sizing">'box-sizing' property</h3>
@@ -206,7 +157,7 @@ That is, any padding or border specified on the element
206157
is laid out and drawn inside this specified width and height.
207158
The content width and height are calculated
208159
by subtracting the border and padding widths of the respective sides
209-
from the specified 'width'
160+
from the specified 'width'
210161
and 'height' properties.
211162
As the content width and height
212163
<a href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">cannot be negative</a> ([[!CSS21]], section 10.2),
@@ -272,12 +223,11 @@ ways:
272223

273224
The outline properties control the style of these dynamic outlines.
274225

275-
Keyboard users depend on outline on elements in the :focus state for interaction with the page, thus authors must not make the outline invisible on such elements without making sure an alternative highlighting mechanism is provided.
226+
The stacking of the rendering of these outlines is explicitly left up to implementations to provide a better user experience per platform. This supersedes the stacking of outlines as defined in CSS 2.1.
276227

277-
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-51">51</a> Applying transforms to outlines behaves strangely in current implementations (See <a href="
278-
http://florian.rivoal.net/csswg/outline.html">transformed outline test case</a>). Proposed resolution: leave transformed outline rendering undefined in CSS3-UI.
228+
Keyboard users depend on outline on elements in the :focus state for interaction with the page, thus authors must not make the outline invisible on such elements without making sure an alternative highlighting mechanism is provided.
279229

280-
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-55">55</a> Outline rendering is under-specified, and details are not interoperable (See <a href="https://lists.w3.org/Archives/Public/www-style/2014Dec/0134.html">a few outline rendering test cases</a>). Tentative proposal: leave non-interop details unspecified in CSS3-UI, attempt to converge in level 4.
230+
The rendering of applying transforms to outlines is left explicitly undefined in CSS3-UI.
281231

282232

283233
<h3 id="outline">'outline' property</h3>
@@ -558,36 +508,20 @@ The 'resize' property applies to elements
558508
whose computed 'overflow' value
559509
is something other than ''visible''.
560510

561-
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-52">52</a> Implementation handling of 'resize' on ::before generated content is buggy and not interoperable (See: <a href="http://dabblet.com/gist/ab432c3f6a8f672cd077">resize on :before test case</a>). A few possible resolutions: explicitly specify :resize does not apply to generated content (result undefined), (result no effect - would be at risk) or that it does apply (not interop, would be at risk).
511+
The 'resize' property does not apply to generated content, the result is undefined.
512+
513+
Note: the 'resize' property may apply in the future if there is implementation of <a href="http://dev.w3.org/csswg/css-pseudo/#CSSPseudoElement-interface">Interface CSSPseudoElement</a>.
562514

563515
When an element is resized by the user,
564-
the user agent uses a resize function
565-
based on the unresized computed width and height
566-
as part of determining the used width and height.
567-
The element's contents (and surroundings) are reformatted as necessary.
568-
569-
The resize function introduces a step in width/height calculations and formatting
570-
as described in <a href="http://www.w3.org/TR/CSS21/visudet.html">chapter 10 of CSS2.1</a>.
571-
Specifically the following step is inserted between steps 1 and 2
572-
of the algorithm in <a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths">section 10.4</a>
573-
and <a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-heights">10.7</a> in CSS2.1 [[!CSS21]],
574-
where [dimension] is 'width' for 10.4 and 'height' for 10.7.
575-
<blockquote><p style="text-indent:-2em">
576-
1b. If the resize [dimension] function is in use,
577-
then the tentative used [dimension] is computed with that function,
578-
and the rules above are applied again,
579-
but this time using the result of that function as the computed value for '[dimension]'.
580-
</blockquote>
581-
582-
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-47">47</a> There is evidence that implementations support resize by setting inline style width and height on the element, and there is <a href="http://lists.w3.org/Archives/Public/www-style/2014Dec/0177.html">a proposal to specify that behavior explicitly</a> (<a href="https://lists.w3.org/Archives/Public/www-style/2014Dec/0063.html">previous proposal</a>).
583-
584-
With regard to interactivity and the Document Object Model (DOM),
585-
the resize function on an element lasts the lifetime of the element,
586-
however, if the computed 'resize' property itself is altered
587-
(e.g. via pseudo-class change or via DOM manipulation),
588-
then the resize function is reset to
589-
using the element's unresized computed width and height.
516+
the user agent sets
517+
the 'width' and 'height' properties
518+
to px unit length values of the size indicated by the user,
519+
in the element’s 'style' attribute DOM,
520+
replacing existing property declaration(s) if any,
521+
without ''!important'' if any.
590522

523+
If an element is resized in only one dimension,
524+
only the corresponding property is set, not both.
591525

592526
The precise direction of resizing
593527
(i.e. altering the top left of the element or altering the bottom right)
@@ -598,15 +532,25 @@ and 'bottom' properties,
598532
whether the language of the element is right-to-left etc.
599533
The precise direction of resizing is left to the UA to properly determine for the platform.
600534

601-
The user agent should allow the user to resize the element with no other constraints than what is imposed by min-width and max-width.
602-
(at risk due since <a href="http://lists.w3.org/Archives/Public/www-style/2014Dec/0063.html">only Firefox currently supports this</a>).
603-
604-
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-53">53</a> is related to the resize constraints being at risk.
535+
The user agent should allow the user to resize the element
536+
with no other constraints than what is imposed by
537+
'min-width', 'max-width', 'min-height', and 'max-height'.
538+
(<a href="https://wiki.csswg.org/spec/css3-ui#issue-53">at risk</a>
539+
since
540+
<a href="http://lists.w3.org/Archives/Public/www-style/2014Dec/0063.html">only Firefox currently supports this</a>).
605541

606542
The user agent may restrict the resizing range to something suitable,
607543
such as between the original formatted size of the element,
608544
and large enough to encompass all the element's contents.
609545

546+
Note: There may be situations where user attempts to resize an element
547+
to appear to be overriden or ignored, e.g. because of ''!important'' cascading declarations that supersede
548+
that element’s 'style' attribute
549+
'width' and 'height' properties in the DOM.
550+
551+
Changes to the computed value of an element's 'resize' property
552+
do not reset changes to the 'style' attribute made due to
553+
user resizing of that element.
610554

611555
<div class="example"><p style="display:none">Example(s):
612556

@@ -671,17 +615,14 @@ in the inline progression direction of its block container element ("the block")
671615
that has 'overflow'
672616
other than ''visible''.
673617

674-
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-68">68</a> Should text-overflow apply even when overflow is visible? Possible resolutions: Apply text-overflow regardless of overflow, or consider reverting
675-
<a href="https://www.w3.org/wiki/CSS3-UI#Issue_32">resolved issue 32</a>.
676-
677618
Text can overflow for example when it is prevented from wrapping
678619
(e.g. due to '<code class="lang-css">white-space: nowrap</code>'
679620
or a single word is too long to fit).
680621
Values have the following meanings:
681622

682623
<dl data-dfn-for="overflow" class="valuedef">
683624
<dt><dfn>clip</dfn></dt>
684-
<dd>Clip inline content that overflows. Characters may be only partially rendered.</dd>
625+
<dd>Clip inline content that overflows its block container element. Characters may be only partially rendered.</dd>
685626

686627
<dt><dfn>ellipsis</dfn></dt>
687628
<dd>
@@ -699,6 +640,8 @@ for bidi purposes.
699640
</dd>
700641
</dl>
701642

643+
Note: The "[...] its block container element" detail of the "clip" value definition is at risk pending implementation and potentially web compatibility feedback.
644+
702645
Note: The <<string>> value, and the 2-value syntax "{1,2}"
703646
and functionality are all at risk.
704647

@@ -732,8 +675,6 @@ atomic inline-level element</a>
732675
on a line
733676
must be clipped rather than ellipsed.
734677

735-
Implementations may ellipse at a text wrap opportunity that occurs before a character boundary where an ellipsis is required.
736-
737678
<h4 id="ellipsing-details" class="no-num no-toc">ellipsing details</h4>
738679
<ul>
739680
<li>
@@ -990,6 +931,9 @@ then only the end ellipsis/string should be rendered.
990931
<!-- got this far reformatting lines -->
991932
This property specifies the type of cursor to be displayed for the pointing device
992933
when within the element's border-box.
934+
935+
The cursor property does not apply over native user-agent controls such as scrollbars, resizers, or other native UI widgets e.g. those that may be used inside some user agent specific implementations of form elements.
936+
993937
Values have the following meanings:
994938

995939
image cursors
@@ -1043,7 +987,7 @@ general purpose cursors
1043987
<dl>
1044988
<dt style="cursor:auto">auto</dt>
1045989
<dd>The UA determines the cursor to display based on the current
1046-
context.
990+
context, specifically: auto behaves as 'text' over text, and 'default' otherwise.
1047991

1048992
<div>
1049993
Issue: <a href="https://wiki.csswg.org/spec/css3-ui#issue-48">48</a> There are reports that this description of cursor: auto is insufficient and not interoperable. Current plan: restrict the auto value to handling things that cannot be described by the UA stylesheet, pending detailed proposal, likely based on <a href="https://lists.w3.org/Archives/Public/www-style/2013Jan/0275.html">David Baron's proposal</a>.
@@ -1288,6 +1232,16 @@ there is no need to refocus the same element.
12881232

12891233
If no element matches the selector,
12901234
the user agent automatically determines which element to navigate the focus to.
1235+
1236+
If the focus is navigated to an element
1237+
that was not otherwise focusable,
1238+
it becomes focusable
1239+
only as the result of this directional navigation,
1240+
and the <css>:focus</css> pseudo-class matches the element
1241+
while it is focused as such.
1242+
1243+
Note: there were other options under consideration for such "not otherwise focusable" elements, including focus to the next otherwise focusable element in the document tree (including descendants of such a not otherwise focusable element). Input on such other options is welcome and explicitly solicited, especially from implementation experiences and author experience using the directional navigation properties in their content.
1244+
12911245
</dd>
12921246
<dt>&lt;target-name&gt;</dt>
12931247
<dd>
@@ -1372,11 +1326,9 @@ There is documentation of
13721326
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode">non-interoperability of these implementations.
13731327
</a>
13741328

1375-
Implementations must not add support for the ime-mode property.
1376-
1377-
Implementations should drop support for it as soon as possible.
1329+
User agents should not support the <css>ime-mode</css> property.
13781330

1379-
Authors must not use the ime-mode property
1331+
Authors must not use the ime-mode property.
13801332

13811333
Users may use the ime-mode property only for repair use-cases where they have to work around bad sites and legacy implementations, e.g. with a user style sheet rule like:
13821334
<div class="example">
@@ -1391,6 +1343,15 @@ This example CSS may be placed into a user style sheet file to force password in
13911343

13921344
This specification deliberately does not attempt to document the functionality of legacy ime-mode implementations nor what they specifically support because it does not make sense to pursue or recommend any such path.
13931345

1346+
<div class="note">
1347+
Note: there are several [[HTML5]] features which authors should use to provide information to user agents that allow them to provide a better input user experience:
1348+
1349+
<ul>
1350+
<li>The global <code>lang</code> attribute
1351+
<li>The <code>inputmode</code>, <code>pattern</code>,
1352+
and <code>type</code> attributes of the input element
1353+
</ul>
1354+
</div>
13941355

13951356

13961357
<hr title="Separator from footer">
@@ -1429,7 +1390,9 @@ Thanks to feedback and contributions from
14291390
<span class="h-card">Peter Linss</span>,
14301391
<span class="h-card">Kang-Hao Lu</span>,
14311392
<span class="h-card">Masayuki Nakano</span>,
1393+
<span class="h-card">Mats Palmgren</span>,
14321394
<span class="h-card">Brad Pettit</span>,
1395+
<span class="h-card">François Remy</span>,
14331396
<span class="h-card">Florian Rivoal</span>,
14341397
<span class="h-card">Andrey Rybka</span>,
14351398
<span class="h-card">Simon Sapin</span>,
@@ -1474,29 +1437,7 @@ implemented features.
14741437
<h3 class="no-num" id="changes-list">List of substantial changes</h3>
14751438

14761439
<ul>
1477-
<li><css>::value</css> pseudo-element. Added detail about which properties apply to the ::value pseudo-element.
1478-
1479-
<li>'text-overflow' property - added <<string>> value and 2 values option, both explicitly at risk.
1480-
1481-
<li>'nav-up', 'nav-right', 'nav-down', and 'nav-left' properties removed from the "at risk" list.
1482-
1483-
<li>'nav-index' dropped due to lack of implementation interest.
1484-
1485-
<li>'cursor' values "grab" and "grabbing" added per multiple interoperable implementations.
1486-
1487-
<li>Numerous UI selectors moved to Selectors4 and CSS Pseudo module.
1488-
1489-
<li>add 'caret-color' property, but at risk.
1490-
1491-
<li>'ime-mode' explicitly obsoleted.
1492-
1493-
<li>'outline-offset' define negative values.
1494-
1495-
<li>'icon' property dropped.
1496-
1497-
<li>'content' property 'icon' value dropped.
1498-
1499-
<li>XForms-only pseudo-elements dropped.
1440+
<li><css>::value</css> and <css>::choices</css> pseudo-elements have been dropped due to insufficient implementer interest. As they were published in a previous CR draft, they may be re-added in a future level if implementers show interest and intent to implement.
15001441

15011442
</ul>
15021443

0 commit comments

Comments
 (0)