草案
此页面不完整。
<ident>
CSS
data type
denotes an arbitrary string used as an
identifier
.
The syntax of
<custom-ident>
is similar to CSS identifiers (such as property names), except that it is
case-sensitive
. It consists of one or more characters, where characters can be any of the following:
A
to
Z
,或
a
to
z
),
0
to
9
),
-
),
_
),
\
),
\
, followed by one to six hexadecimal digits, representing its Unicode code point)
注意,
id1
,
Id1
,
iD1
and
ID1
are all different identifiers as they are
case-sensitive
. On the other hand, as there are several ways to escape a character,
toto\?
and
toto\3F
are the same identifiers.
nono79 A mix of alphanumeric characters and numbers ground-level A mix of alphanumeric characters and a dash -test A dash followed by alphanumeric characters --toto A custom-property like identifier _internal An underscore followed by alphanumeric characters \22 toto A Unicode character followed by a sequence of alphanumeric characters bili\.bob A correctly escaped period
34rem It must not start with a decimal digit. -12rad It must not start with a dash followed by a decimal digit. bili.bob Only alphanumeric characters, _, and - needn't be escaped. 'bilibob' This would be a<string>. "bilibob" This would be a<string>.
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Values and Units Module Level 4
The definition of '
<ident>
' in that specification.
|
编者草案 | |
|
CSS Values and Units Module Level 3
The definition of '
<ident>
' in that specification.
|
候选推荐 |
As this type is not a real type but a convenience type used to simplify the definition of other CSS syntax.
<custom-ident>
– A restricted subset of
<ident>
values excluding
CSS-wide
keywords,
custom properties
and other
per-property
values.