@@ -501,10 +501,11 @@ Quoted Strings: the <> type
501
501
502
502
Resource Locators: the <> type
503
503
504
- A URL is a pointer to a resource
505
-
506
- denoted by <> .
507
- The syntax of a <> is:
504
+
505
+ denoted by <> ,
506
+ represents a URL ,
507
+ which is a pointer to a resource.
508
+ The typical syntax of a <> is:
508
509
509
510
510
511
@@ -514,44 +515,42 @@ Resource Locators: the <> type
514
515
body { background: url("http://www.example.com/pinkish.gif") }
515
516
516
517
517
- In addition to the syntax defined above,
518
- a <> can sometimes be written in other ways:
519
-
520
- * A <> can be written without quotation marks around the URL itself.
521
- (This syntax is
specially-parsed
522
- as a <> . [[!CSS3SYN]] )
523
-
524
-
525
- For example, the following declarations are identical:
526
-
527
- background: url("http://www.example.com/pinkish.gif");
528
- background: url(http://www.example.com/pinkish.gif);
529
-
530
-
531
-
532
- * Some CSS contexts (such as ''@import'' ) allow a <> to be represented by a bare <> ,
533
- without the ''url()'' wrapper.
534
- In such cases the string behaves identically to a ''url()'' function containing that string.
535
-
536
-
537
- For example, the following statements are identical:
538
-
539
- @import url("base-theme.css");
540
- @import "base-theme.css";
541
-
542
-
543
-
544
- Note: The special parsing rules for the legacy quotation-mark–less <> syntax
545
- means that parentheses,
whitespace characters,
518
+ A <> may alternately be written without quotation marks around the URL itself,
519
+ in which case it is
specially-parsed
520
+ as a <> [[!CSS3SYN]] .
521
+
522
+
523
+ For example, the following declarations are identical:
524
+
525
+ background: url("http://www.example.com/pinkish.gif");
526
+ background: url(http://www.example.com/pinkish.gif);
527
+
528
+
529
+
530
+ Note: This unquoted syntax is cannot accept a <> argument
531
+ and has extra escaping requirements:
532
+ parentheses,
whitespace characters,
546
533
single quotes (') and double quotes (") appearing in a URL
547
534
must be escaped with a backslash,
548
535
e.g. ''url(open\(parens)'' , ''url(close\)parens)'' .
536
+ (In quoted <> ''url()'' s,
537
+ only newlines and the character used to quote the string need to be escaped.)
549
538
Depending on the type of URL,
550
539
it might also be possible to write these characters as URL-escapes
551
540
(e.g. ''url(open%28parens)'' or ''url(close%29parens)'' )
552
541
as described in [[URL]] .
553
- Alternately, the URL can be quoted as a string,
554
- in which case only newlines and the character used to quote the string need to be escaped.
542
+
543
+ Some CSS contexts (such as ''@import'' ) also allow a <>
544
+ to be represented by a bare <> , without the ''url()'' wrapper.
545
+ In such cases the string behaves identically to a ''url()'' function containing that string.
546
+
547
+
548
+ For example, the following statements are identical:
549
+
550
+ @import url("base-theme.css");
551
+ @import "base-theme.css";
552
+
553
+
555
554
556
555
557
556
Relative URLs
@@ -1393,7 +1392,7 @@ Images: the <> type
1393
1392
1394
1393
The
<> value specifies the position of a object area (e.g. background image)
1395
1394
inside a positioning area (e.g. background positioning area).
1396
- It is interpreted as specified for 'background-position' . [[!CSS3-BACKGROUNDS ]]
1395
+ It is interpreted as specified for 'background-position' . [[!CSS3-BACKGROUND ]]
1397
1396
1398
1397
1399
1398
@@ -2089,8 +2088,10 @@ Changes
2089
2088
Inlined the
<> definition and dropped the three-value syntaxes
2090
2089
to allow for unambiguous combination in complex grammars.
2091
2090
This effectively removes that syntax from 'object-position' ,
2092
- but allows
<> to be re-used e.g. in
[[CSS-TRANSFORMS]] for 3D positions.
2091
+ but allows
<> to be re-used e.g. in
[[CSS-TRANSFORMS-1 ]] for 3D positions.
2093
2092
2093
+ Clarified handling of font-relative units outside the context of an element.
2094
+ Clarified definition of ''url()'' to normatively accept unquoted syntax.
2094
2095
2095
2096
2096
2097
0 commit comments