css4-ui features list

The CSS Basic User Interface Module Level 3 (CSS3-UI, latest Editor's draft) defines user interface related selectors, properties and values.

CSS3-UI is deliberately scoped to what's been interoperably implemented, so it's a firm stake in the ground that implementers and authors can depend on.

CSS4-UI is for new features above and beyond CSS3-UI.

In somewhat order of priority:

extensions to css3-ui features

implementation extensions

Implementations may have found it useful to extend existing CSS3-UI features, but perhaps they are only experimental extensions or single implementations.

As these are most likely to be practical and minimal (and supported by a second implementation), these are the first features we'll consider.

new cursor values

real world author extension needs

Second, users and authors may have found that they wanted a CSS3-UI feature to work a certain way in their sites, and these real world needs are a second consideration.

theoretical extension requests

Third, there are hypothetical requests for extensions to CSS3-UI features. As these are not real world proven (only theoretical) demands, they are purely tertiary. We may consider them optimistically and include them in working drafts to solicit feedback and additional interest.

new css4-ui features

Brand new features fo CSS4-UI. We'll follow the same prioritization as above.

caret property

Consider adding a new 'caret' property.

Name: caret
Value: auto | <color> | invert
Initial: auto
Applies to: Any element that accepts textual input
Inherited: Yes
Percentages: N/A
Media: Interactive
Computed value: The computed value for 'invert' is 'invert'. For <color> 
values, the computed value is as defined for the [CSS3COLOR] 'color' 
property.

UAs set the color of the caret cursor to the value of the 'caret' property.

The 'invert' value is expected to perform a color inversion on the pixels on the screen under the caret cursor. UAs may ignore the 'invert' value on platforms that do not support color inversion of the pixels on the screen.

Note: The caret cursor (also known as the text insertion cursor) is distinct from the pointing cursor (typically called just “cursor” in CSS and controlled with the 'cursor' property). The caret cursor is usually displayed (often rendered as a blinking line segment perpendicular to the inline-progression direction) by the user agent in active text inputs without any selected text, where user entered text will be inserted.

Note: The 'caret' property could be extended to other aspects (e.g. caret width or style) and become a shorthand for a caret-color, if there is sufficient demand and use cases. Or alternately we could name it 'caret-color' to begin with.

Implementer feedback:

focusable property

Consider incorporating a 'focusable' property (like in SVG)

http://www.w3.org/TR/SVGTiny12/interact.html#focusable-attr

Alternate syntax suggestion (because boolean properties are the devil):

nav-focus: _normal_ | ignore | focus

more selectors

  • ::placeholder pseudo-element for the placeholder content inside an input element with a placeholder attribute.
    • There's an empty documentation page for ::-moz-placeholder which is implemented as of Firefox 19.
  • :placeholder-shown pseudo-class for when an input element is in the state of showing its placeholder text
  • :autofill pseudo-class for when an input element is in the state of showing an autofilled value. Related implementer bugs (not yet implemented) :
  • :broken for elements representing broken image links. See also Mozilla bug 11011.
  • :user-disabled matches elements representing images that were not loaded because images have been entirely disabled by the user's preferences
  • :suppressed for elements representing images that were not loaded because loading images from that site has been blocked.
  • :loading for elements none of which can be displayed because they have not started loading, such as images that haven't started to arrive yet. Note that images that are in the process of loading are not matched by this pseudo-class.
  • ::progress-bar pseudo-element for selecting and styling the area of an HTML progress element that represents the amount of progress that has happened so far. This lets you, for example, change the color of progress bars.
  • :valid-drop-zone, :invalid-drop-zone - a drop-zone (as Mozilla implements :-moz-drag-over) that is valid/invalid.
    • :valid-drop-zone - a drop zone that accepts the type of data being dragged
    • :invalid-drop-zone - a drop zone that doesn't accept the type of data being dragged
  • ::backdrop-of(selector) - a pseudo-element that matches the backdrop of a fullscreened element, a modal dialog, or other platform features with similar needs.

pointer-events

Moved from CSS3-UI editor's draft because it was the top source of issues for the 2nd CSS3-UI LCWD, and because it requires documenting previously undocumented web platform hit-testing model.

Incorporate spec text from:

Consider just specifying pointer-events:none, and reserving the other keywords as undefined in CSS (at this level of spec.

  • input from zewt, wilto asking for pointer-events:none in particular (#whatwg 2012-227)

Consider use-cases, in particular for pointer-events:none;

  • make sure things that use CSS opacity:0 transitions aren't clickable when they're hidden. (zewt on #whatwg 2012-227)
  • disable clicks on elements that are transitioning on/off screens (zewt on #whatwg 2012-227)
  • prevent transparent elements that overlap clickable ones from getting in the way (zewt on #whatwg 2012-227)

Consider adding a 'paint-order' value, as per Tokyo 2013 discussion

  • this would replace the normal DOM-order user-event bubbling with bubbling through the result of elementsFromPoint()
  • could be used with positioned elements displayed outside their DOM parent
  • could be used in fragmented content to include the fragment container

text-overflow fade

Instead of an ellipsis character, apply a fixed width (e.g. 2em) linear gradient mask on the right-hand-end (modulo inline-progression direction) of the text conditional on the text overflowing.

Needs to work over non-solid color backgrounds.

Perhaps extend 'text-overflow' to take a value:

  • |fade <length>| or |fade(<length>)|

From this email thread:

text-overflow middle

Some mechanism to control ellipsing of text by allowing it to be ellipsed “in the middle” (somehow). See also other related text-overflow features dropped from CSS3.

See emails:

touch-action

The Pointer Events WD introduced a “touch-action” property.

Microsoft has shipped support for “touch-action” in prefixed form in IE10:

The CSSWG discussed “touch-action” in the 2013-01-16 telcon:

Issues from the telcon:

  • The touch-action property might be overly-specific to touch interfaces
  • Discussed whether touch-action property is necessary.
  • Spec should show examples of how 'touch-action' is used in an all-declarative use case. (If it is only useful when JS is invoked, maybe its behavior should likewise be handled by JS, not by introducing a declarative property that's only useful when mixed with JS.)

There's a subsequent discussion thread on the “public-pointer-events” list about “touch-action”:

Issues from the mailing list discussion:

Once the issues from the mailing list discussions are documented, and those plus the issues raised in the telcon are resolved, we should draft a definition of “touch-action” (or equivalent functionality) in CSS4-UI.

dropped css3 features

Features that were dropped from CSS3-UI (e.g. the 2004 CR) are eligible to be considered for CSS4-UI, but they will need a strong justification as having been ignored by implementations for 6+ years means there was likely something wrong with them and they need major revising. In addition, features dropped from other CSS3 specs or trimmed when bringing over to CSS3-UI are also considered here.

appearance

The System Appearance feature, including the appearance property, was in the 2004 CSS3-UI CR but never implemented as designed. It likely needs a complete rethink and redesign, perhaps even a reframing/reexploration of the problems it was designed to solve.

In practice, “appearance:none” is occasionally required in some UAs (like Gecko, WebKit) to turn off the native rendering of some controls and allow full CSS styling.

Some form of “appearance:none” may be worth exploring as a CSS4-UI feature.

At the time of the introduction and development of the 'appearance' property, it appeared that the limited set of specific UI elements in HTML were not going to be extended, and thus we tried going so (in a limited capacity) with CSS.

Since new input elements etc. have been added to HTML5, and there is clearly opportunity to add more as deemed practically necessary, it makes more sense now to pursue new specific UI elements in HTML5 first, and then design any new related CSS features subsequently.

I've archived the 2004 System Appearance feature spec source on the W3C wiki (it seems to support better escaping of embedded markup).

text-overflow string plus

The string value for text-overflow should have the same syntax as the content rule.

Real-world use-cases:

  • none.

Theoretical use-cases:

  • author might want to use an image
  • author might want to use css counters
  • author might want to use an attribute contents for the ellipsis

text-overflow block hint

text-overflow: second <string> as an overflow visual hint after the element box. The visual hint after the element box only appears if there is content which is clipped because of the block-progression dimension of the block, not because the last line cannot fit. If the visual hint after the element box is enabled and would appear at the same location as the visual hint at the end of the element box, only the visual hint after the element box is rendered.

Originally text-overflow: second <string> was defined in CSS3 Text CR 2003-05-14 for after the element box in addition to the end of the text being overflowed - but no one implemented it. Thus any request for including this MUST include some justification as to why/how implementations would consider it differently than they did (and reject) for CSS3 Text CR 2003.

The current CSS3-UI text-overflow already uses two values for the start and end of the text, so another property (or another way of specifying the value) would be needed for this before/after the element box functionality.

In addition

Real world use-cases:

  • what iTunes App Store does for its app descriptions (more details needed).

This should likely be done as a new property, e.g. 'block-overflow', as described by Tab Atkins here:

text-overflow start end values

Originally text-overflow permitted an optional second value defined in CSS3 Text CR 2003-05-14 <ellipsis>{1,2} ”

Status:

  • in CSS3-UI editor's draft “at risk”

Real-world use-cases:

  • none.

Theoretical use-cases:

  • none.

Hypothetical reasoning:

  • Since the spec calls for overflow markers on both sides, it seems reasonable to give the author control over each side separately.
    • Given that the clipping is visual rather than logical, it makes sense that the two-value form should also be visual left/right rather than logical start/end. - Mats
    • Note that the previous CSS3-Text CR defined two values as: “If two <ellipsis> values area provided, they determine the overflow visual hint at the end and the overflow visual hint after the element box respectively.”

user-select

Last seen in the 2000 era draft of User Interface for CSS3, the 'user-select' property controls the selection model and granularity of an element.

Implementation Status:

Spec Status:

  • not in any current draft.

Last publication:

Issues:

  • 'all' vs. 'atomic' value
    • Gecko implementation of the 'all' value does not reflect last specified definition (2000).
    • WebKit wants a 'atomic' value that acts as 'all' was specified in 2000.
    • Might be possible to get Gecko to change its 'all' behavior to as specified and avoid introducing a new 'atomic' value.
  • 'none' vs. '-moz-none' value

For CSS4-UI:

  • Minimum: spec the interoperable values among existing implementations (excluding 'all')
  • Possibly: minimum plus keep 'all' as specified, and get Gecko fixed to be compliant
  • Maximum: spec all values, including 'toggle' and 'elements' and file bugs accordingly with existing implementations to get those values implemented.

css4-ui issues list

Current Issues

There is no editor's draft of CSS4-UI yet - so there's nothing to have issues against!

The editor's draft will eventually be here:

 
spec/css4-ui.txt · Last modified: 2014/02/24 15:34 by tantek
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki