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: index.bs
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -973,7 +973,7 @@ the functionality you are adding is **not** similar to that of the existing attr
973
973
This is an antipattern; one of these groups of attributes should have had a different name.
974
974
</div>
975
975
976
-
<h3 id="avoid-html-parser-blocking">Do not pause the HTML parser</h3>
976
+
<h3 id="avoid-html-parser-blocking">Do not pause the HTML parser</h3>
977
977
978
978
Ensure that your design does not require HTML parser to pause to handle external resources.
979
979
@@ -992,15 +992,29 @@ This is the case of legacy `<script src="…">` elements,
992
992
which can inject into the parser using `document.write(…)`.
993
993
Due to the performance issues above, new features must not do this.
994
994
995
-
<h3 id="avoid-render-blocking">Avoid features that block rendering</h3>
995
+
<h3 id="avoid-render-blocking">Avoid features that block rendering</h3>
996
996
997
997
Features that require resource loading or other operations before rendering the page,
998
998
often result in blank page (or the previous page). The result is a poor user experience.
999
999
1000
1000
Consider adding such features only in cases when the overall user experience is improved.
1001
-
A canonical example of this is blocking rendering in order to download and process a stylesheet.
1001
+
A canonical example of this is blocking rendering in order to download and process a stylesheet.
1002
1002
The alternative user experience is a flash of unstyled content, which is undesirable.
1003
1003
1004
+
<h3 id="naming-of-url-attributes">Name URL-containing attributes based on their primary purpose</h3><!-- https://github.com/w3ctag/design-principles/issues/278 -->
1005
+
1006
+
If the element enables the user to navigate to the URL contained in the attribute, call the attribute `href`, like the <{a}> element's <{a/href}> attribute.
1007
+
1008
+
Note: In hindsight, <{form}>'s <{form/action}> attribute should have been named `href`.
1009
+
1010
+
If the element causes the resource at the given URL to be loaded, call the attribute `src`, like the <{img}> element's <{img/src}> attribute or the <{script}> element’s <{script/src}> attribute.
1011
+
1012
+
Note: HTML has a number of legacy inconsistencies that should not be emulated, like the way <{link}>'s <{link/href}> attribute might allow for navigation or for resource loading, depending on the value of the element's <{link/rel}> attribute. <!-- TODO: Add an <object data> example after w3ctag/design-principles#370 has been written. -->
1013
+
1014
+
If the attribute identifies a URL that is auxilliary to the element's purpose, like <{video}>'s <{video/poster}>, <{q}>'s <{q/cite}>, or <{a}>’s <{a/ping}>, name the attribute after its semantics.
1015
+
1016
+
Note: remember that attributes containing URLs should be represented in IDL as {{USVString}}; see [[#idl-string-types]].
1017
+
1004
1018
<h2 id="css">Cascading Style Sheets (CSS)</h2>
1005
1019
1006
1020
This section details design principles for features which are exposed via CSS.
0 commit comments