@@ -501,10 +501,11 @@ Quoted Strings: the <<string>> type</h3>
501
501
<h3 id="urls">
502
502
Resource Locators: the <<url>> type</h3>
503
503
504
- A <dfn>URL</dfn> is a pointer to a resource
505
- and is a <a>functional notation</a>
506
- denoted by <<url>> .
507
- The syntax of a <<url>> is:
504
+ The <dfn>url()</dfn> <a>functional notation</a> ,
505
+ denoted by <<url>> ,
506
+ represents a <dfn>URL</dfn> ,
507
+ which is a pointer to a resource.
508
+ The typical syntax of a <<url>> is:
508
509
509
510
<pre class="prod"><dfn id="url-value"><url></dfn> = url( <<string>> <<url-modifier>> * )</pre>
510
511
@@ -514,44 +515,42 @@ Resource Locators: the <<url>> type</h3>
514
515
<pre> body { background: url("http://www.example.com/pinkish.gif") }</pre>
515
516
</div>
516
517
517
- In addition to the syntax defined above,
518
- a <<url>> can sometimes be written in other ways:
519
-
520
- * A <<url>> can be written without quotation marks around the URL itself.
521
- (This syntax is <a lt="consume a url token" spec=css-syntax-3>specially-parsed</a>
522
- as a <<url-token>> . [[!CSS3SYN]] )
523
-
524
- <div class="example">
525
- For example, the following declarations are identical:
526
- <pre>
527
- background: url("http://www.example.com/pinkish.gif");
528
- background: url(http://www.example.com/pinkish.gif);
529
- </pre>
530
- </div>
531
-
532
- * Some CSS contexts (such as ''@import'' ) allow a <<url>> to be represented by a bare <<string>> ,
533
- without the ''url()'' wrapper.
534
- In such cases the string behaves identically to a ''url()'' function containing that string.
535
-
536
- <div class="example">
537
- For example, the following statements are identical:
538
- <pre>
539
- @import url("base-theme.css");
540
- @import "base-theme.css";
541
- </pre>
542
- </div>
543
-
544
- Note: The special parsing rules for the legacy quotation-mark–less <<url>> syntax
545
- means that parentheses, <a href="https://www.w3.org/TR/css-syntax/#whitespace">whitespace</a> characters,
518
+ A <<url>> may alternately be written without quotation marks around the URL itself,
519
+ in which case it is <a lt="consume a url token" spec=css-syntax-3>specially-parsed</a>
520
+ as a <<url-token>> [[!CSS3SYN]] .
521
+
522
+ <div class="example">
523
+ For example, the following declarations are identical:
524
+ <pre>
525
+ background: url("http://www.example.com/pinkish.gif");
526
+ background: url(http://www.example.com/pinkish.gif);
527
+ </pre>
528
+ </div>
529
+
530
+ Note: This unquoted syntax is cannot accept a <<url-modifier>> argument
531
+ and has extra escaping requirements:
532
+ parentheses, <a href="https://www.w3.org/TR/css-syntax/#whitespace">whitespace</a> 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 <<string>> ''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 <<url>>
544
+ to be represented by a bare <<string>> , without the ''url()'' wrapper.
545
+ In such cases the string behaves identically to a ''url()'' function containing that string.
546
+
547
+ <div class="example">
548
+ For example, the following statements are identical:
549
+ <pre>
550
+ @import url("base-theme.css");
551
+ @import "base-theme.css";
552
+ </pre>
553
+ </div>
555
554
556
555
<h4 id="relative-urls">
557
556
Relative URLs</h4>
@@ -1393,7 +1392,7 @@ Images: the <<image>> type</h3>
1393
1392
1394
1393
The <dfn><<position>></dfn> 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
<pre class=prod>
1399
1398
<<position>> = [
@@ -2089,8 +2088,10 @@ Changes</h2>
2089
2088
<li> Inlined the <<position>> 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 <<position>> to be re-used e.g. in [[CSS-TRANSFORMS]] for 3D positions.
2091
+ but allows <<position>> to be re-used e.g. in [[CSS-TRANSFORMS-1 ]] for 3D positions.
2093
2092
(See <a href="https://lists.w3.org/Archives/Public/www-style/2017Feb/0052.html">discussion</a> .)
2093
+ <li> Clarified handling of font-relative units outside the context of an element.
2094
+ <li> Clarified definition of ''url()'' to normatively accept unquoted syntax.
2094
2095
</ul>
2095
2096
2096
2097
Changes since the <a href="https://www.w3.org/TR/2015/CR-css-values-3-20150611/">11 June 2015 Candidate Recomendation</a> are:
0 commit comments