You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-ui-4/Overview.bs
+70-51Lines changed: 70 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -1082,26 +1082,57 @@ Cursor of the canvas</h5>
1082
1082
<h3 id="insertion-caret">
1083
1083
Insertion caret</h3>
1084
1084
1085
+
The <dfn lt="insertion caret|caret">insertion caret</dfn> (or “caret” for short)
1086
+
is a visible indicator of the insertion point in an element that [=accepts text input=],
1087
+
where text (and potentially other content) can be inserted by the user.
1088
+
The 'caret-color', 'caret-animation', and 'caret-shape' properties
1089
+
give the author some amount of control over the appearance of the [=caret=].
1090
+
1091
+
Text or elements are considered to <dfn>accept text input</dfn>
1092
+
if they are either an [=editable element=] or a descendent thereof,
1093
+
excluding any such element where the [=used value=] of 'user-select' is ''user-select/none'',
1094
+
as well as subtrees rooted at an HTML element with a {{ElementContentEditable/contentEditable}} attribute set to {{ElementContentEditable/contentEditable/false}}.
1095
+
1096
+
Some user agents have other user interface mechanisms
1097
+
with a similar appearance,
1098
+
also occasionally referred to as “carets”.
1099
+
For example, some UAs can show a “navigation caret”,
1100
+
which acts similarly to an [=insertion caret=]
1101
+
but can be moved around in non-editable text.
1102
+
The 'caret-color', 'caret-animation', and 'caret-shape' properties
1103
+
are not intended to apply to such mechanisms
1104
+
nor outside of [=editable elements=],
1105
+
though user agents may choose to take them into account.
1106
+
Whether to do so and to what extent is up to the user agent.
1107
+
1108
+
Note: The cursor image shown
1109
+
when hovering over text when the 'cursor' property is ''cursor/auto'',
1110
+
or when hovering over an element where the 'cursor' property is ''cursor/text'' or ''cursor/vertical-text'',
1111
+
though it sometimes resembles a caret,
1112
+
is not a caret (it's a cursor).
1113
+
1085
1114
<h4 id="caret-color" caniuse="css-caret-color">
1086
1115
Coloring the Insertion Caret: the 'caret-color' property</h4>
1087
1116
1088
1117
<pre class="propdef">
1089
1118
Name: caret-color
1090
1119
Value: auto | <<color>>
1091
1120
Initial: auto
1092
-
Applies to: all elements
1121
+
Applies to: text or elements that [=accept text input=]
1093
1122
Inherited: yes
1094
1123
Percentages: N/A
1095
1124
Computed value: The computed value for ''caret-color/auto'' is ''caret-color/auto''.
1096
1125
For <<color>> values, see [[CSS-COLOR-4#resolving-color-values]].
1097
1126
Animation Type: by computed value
1098
1127
</pre>
1099
1128
1129
+
This property controls the color of the [=insertion caret=].
1130
+
1100
1131
<dl>
1101
1132
<dt>auto
1102
1133
<dd>
1103
1134
User agents should use ''currentColor''.
1104
-
User agents may automatically adjust the color of caret
1135
+
User agents may automatically adjust the color of [=caret=]
1105
1136
to ensure good visibility and contrast with the surrounding content,
1106
1137
possibly based on the currentColor, background, shadows, etc.
1107
1138
@@ -1111,21 +1142,9 @@ Coloring the Insertion Caret: the 'caret-color' property</h4>
1111
1142
1112
1143
<dt><<color>>
1113
1144
<dd>
1114
-
The insertion caret is colored with the specified color.
1145
+
The [=caret=] is colored with the specified color.
1115
1146
</dl>
1116
1147
1117
-
The caret is a visible indicator of the insertion point in an element where text (and potentially other content) is inserted by the user. This property controls the color of that visible indicator.
1118
-
1119
-
Note: UAs might have additional things that count as “carets”.
1120
-
For example, some UAs can show a “navigation caret”,
1121
-
which acts similarly to an insertion caret
1122
-
but can be moved around in non-editable text
1123
-
and is functionally a caret.
1124
-
On the other hand, the cursor image shown
1125
-
when hovering over text when the 'cursor' property is ''cursor/auto'',
1126
-
or when hovering over an element where the 'cursor' property is ''cursor/text'' or ''cursor/vertical-text'',
1127
-
though it sometimes resembles a caret, is not a caret (it's a cursor).
0 commit comments