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
+96Lines changed: 96 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,102 @@ Abstract: This is a delta specification over CSS-UI Level 3.
87
87
88
88
Issue: Add final level 3 content
89
89
90
+
<h4 id="caret-blink-time">Blinking speed of the insertion caret: 'caret-blink-time'</h4>
91
+
92
+
<pre class='propdef'>
93
+
Name: caret-blink-time
94
+
Value: auto | <<time>>{1,2}
95
+
initial: auto
96
+
Applies to: elements that accept input
97
+
Inherited: yes
98
+
Percentages: N/A
99
+
Media: interactive
100
+
Computed value: Same as specified value, except if only 1 <<time>> is specified, in which case the computed value has 2 instances of <<time>>, both with the same value as the one which was specified.
101
+
Animatable: no
102
+
</pre>
103
+
104
+
On most platforms and in most UAs,
105
+
the text insertion caret blinks.
106
+
This property allows the author
107
+
to control the speed at which it blinks,
108
+
or to turn off blinking entirely.
109
+
110
+
When the computed value is ''caret-blink-time/auto'',
111
+
the UA determines the speed at which the cursor blinks,
112
+
if at all. It should follow platform conventions and settings.
113
+
114
+
If two <<time>> values are specified,
115
+
the caret blinks.
116
+
The first value indicates how long the caret stays on,
117
+
and the second value how long the caret stays off.
118
+
If the second value is ommitted,
119
+
it defaults to the same as the first one.
120
+
Both values must be zero or more.
121
+
122
+
If the second value is 0,
123
+
or if both values are 0,
124
+
the caret does not blink and is always on.
125
+
126
+
If the first value is 0 and the second is not,
127
+
the caret is always off,
128
+
making it effectively invisible.
129
+
130
+
Note: See <a href="http://www.w3.org/TR/WCAG20/#seizure">Guideline 2.3: Seizures: Do not design content in a way that is known to cause seizures</a>[[WCAG20]].
131
+
132
+
<div class=example>
133
+
The following rule gives a caret that stays on for 1 second,
134
+
and off for half a second.
135
+
<pre><code class="lang-css">
136
+
input { caret-blink-time: 1s 500ms; }
137
+
</code></pre>
138
+
</div>
139
+
140
+
<div class=example>
141
+
A user who is disturbed by or has adverse reactions to blinking visuals
142
+
may want to make all carets static and non-blinking,
143
+
regardless of platform defaults or author settings.
144
+
This can be accomplished by with the folliwing rule in the user stylesheet.
145
+
146
+
<pre><code class="lang-css">
147
+
:read-write { caret-blink-time: 0 !important; }
148
+
</code></pre>
149
+
</div>
150
+
151
+
<div class=example>
152
+
Normally, the caret blinks between on and off.
153
+
This makes it alternate between 2 colors.
154
+
<pre><code class="lang-css">
155
+
textarea {
156
+
caret-blink-time: 0;
157
+
caret-color: blue;
158
+
animation: caret-alternate 2s step-end infinite;
159
+
}
160
+
@keyframes caret-alternate {
161
+
from { caret-color: blue; }
162
+
50% { caret-color: red; }
163
+
}
164
+
</code></pre>
165
+
166
+
The simulated rendering below illustrates how this would look.
0 commit comments