Skip to content

Commit 32d2651

Browse files
committed
Use consistant capitalization for "user agent"
Also checks in a little script that helps in doing this semi-automatically.
1 parent e216f23 commit 32d2651

File tree

34 files changed

+168
-153
lines changed

34 files changed

+168
-153
lines changed

bin/ua-capitalization.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# This script automates a large part of making sure "user agent" is written in lower case.
3+
# Doing so is backed by the CSS-WG resolution recorded at https://logs.csswg.org/irc.w3.org/css/2021-04-08/#e1402191
4+
# After this script has run,
5+
# there can remain a few instances of the term being used.
6+
# Those will have to be fixed manually.
7+
# Run frequently to avoid cruft piling up.
8+
for FILE in "$@"
9+
do
10+
sed -i -e "s/\([a-zA-Z,;]\) User Agent/\1 user agent/"\
11+
-e "s/Note: User Agent/Note: User agent/"\
12+
-e "s/\. User Agent/. User agent/" $FILE
13+
done
14+
echo "Remaining instances of 'User Agent':"
15+
grep -R "User Agent" $@

css-2017/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ CSS Profiles</h3>
431431

432432
In the past, the Working Group published a few Profiles,
433433
which were meant to define the minimal subset of CSS
434-
that various classes of User Agents were expected to support.
434+
that various classes of user agents were expected to support.
435435

436436
This effort has been discontinued,
437437
as the Working Group was not finding it effective or useful,

css-2018/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ CSS Profiles</h3>
459459

460460
In the past, the Working Group published a few Profiles,
461461
which were meant to define the minimal subset of CSS
462-
that various classes of User Agents were expected to support.
462+
that various classes of user agents were expected to support.
463463

464464
This effort has been discontinued,
465465
as the Working Group was not finding it effective or useful,

css-2020/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ CSS Profiles</h3>
525525

526526
In the past, the Working Group published a few Profiles,
527527
which were meant to define the minimal subset of CSS
528-
that various classes of User Agents were expected to support.
528+
that various classes of user agents were expected to support.
529529

530530
This effort has been discontinued,
531531
as the Working Group was not finding it effective or useful,

css-backgrounds-3/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2972,7 +2972,7 @@ module.
29722972

29732973
<dl>
29742974
<dt><dfn>UA</dfn>
2975-
<dt><dfn id="user-agent">User Agent</dfn>
2975+
<dt><dfn id="user-agent">user agent</dfn>
29762976
<dd>
29772977
<p>A program that reads and/or writes CSS style sheets on behalf of a
29782978
user in either or both of these categories: programs whose purpose is

css-break-3/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Breaks Between Boxes: the 'break-before' and 'break-after' properties</h3>
273273

274274
<p>
275275
Values for 'break-before' and 'break-after' are defined in the sub-sections below.
276-
User Agents must apply these properties to boxes in the normal flow of the <a>fragmentation root</a>.
276+
User agents must apply these properties to boxes in the normal flow of the <a>fragmentation root</a>.
277277
User agents should also apply these properties to floated boxes
278278
whose containing block is in the normal flow of the root fragmented element.
279279
User agents may also apply these properties to other boxes.

css-break-4/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Breaks Between Boxes: the 'break-before' and 'break-after' properties</h3>
265265
indicate that content should be kept together.
266266

267267
Values for 'break-before' and 'break-after' are defined in the sub-sections below.
268-
User Agents must apply these properties to boxes in the normal flow of the <a>fragmentation root</a>.
268+
User agents must apply these properties to boxes in the normal flow of the <a>fragmentation root</a>.
269269
User agents should also apply these properties to floated boxes
270270
whose containing block is in the normal flow of the root fragmented element.
271271
User agents may also apply these properties to other boxes.

css-contain-1/Overview.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:css-sizing-3; type:value; for:width; text:max-content
5050
<h2 id='intro'>
5151
Introduction</h2>
5252

53-
Efficiently rendering a website relies on the User Agent being able to detect what parts of the page are being displayed,
53+
Efficiently rendering a website relies on the user agent being able to detect what parts of the page are being displayed,
5454
which parts might affect the currently-displayed section,
5555
and what can be ignored.
5656

@@ -126,7 +126,7 @@ Strong Containment: the 'contain' property</h2>
126126
contain-flexbox-outline.html
127127
</wpt>
128128

129-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
129+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
130130

131131
The 'contain' property allows an author to indicate that an element and its contents are,
132132
as much as possible,

css-contain-2/Overview.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ spec:css-sizing-3; type:value; for:width; text:max-content
5757
<h2 id='intro'>
5858
Introduction</h2>
5959

60-
Efficiently rendering a website relies on the User Agent being able to detect what parts of the page are being displayed,
60+
Efficiently rendering a website relies on the user agent being able to detect what parts of the page are being displayed,
6161
which parts might affect the currently-displayed section,
6262
and what can be ignored.
6363

@@ -125,7 +125,7 @@ Strong Containment: the 'contain' property</h2>
125125
contain-flexbox-outline.html
126126
</wpt>
127127

128-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
128+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
129129

130130
The 'contain' property allows an author to indicate that an element and its contents are,
131131
as much as possible,

css-content-3/Overview.bs

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Inserting and replacing content with the 'content' property</h2>
107107
Animation type: discrete
108108
</pre>
109109

110-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
110+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
111111

112112
The 'content' property dictates what is rendered inside an element or pseudo-element.
113113

@@ -395,7 +395,7 @@ Specifying quotes with the 'quotes' property</h4>
395395
Animation type: discrete
396396
</pre>
397397

398-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
398+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
399399

400400
This property specifies quotation marks for any number of embedded quotations. Values have the following meanings:
401401

@@ -965,7 +965,7 @@ The string-set property</h4>
965965
Animation type: discrete
966966
</pre>
967967

968-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
968+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
969969

970970
The 'string-set' property copies the text content of an element into a ''named string'',
971971
which functions as a variable.

css-counter-styles-3/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,7 @@ Symbolic: ''disc'', ''circle'', ''square'', ''disclosure-open'', ''disclosure-cl
17501750
</dl>
17511751

17521752
The ''disc'' counter-style must not be overridable with a ''@counter-style'' rule,
1753-
so that the initial value of 'list-style-type' is well-known to the User Agent.
1753+
so that the initial value of 'list-style-type' is well-known to the user agent.
17541754

17551755
The following stylesheet fragment provides the normative definition of these predefined counter styles:
17561756

css-display-3/Overview.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Box Layout Modes: the 'display' property</h2>
210210
Animation type: not animatable
211211
</pre>
212212

213-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
213+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
214214

215215
The 'display' property defines an element's <dfn export>display type</dfn>,
216216
which consists of the two basic qualities of how an element generates boxes:
@@ -760,7 +760,7 @@ Toggling Box Generation: the 'display-or-not' property</h2>
760760
Computed value: as specified
761761
</pre>
762762

763-
<p class=all-media>User Agents are expected to support this property on all media, including non-visual ones.</p>
763+
<p class=all-media>User agents are expected to support this property on all media, including non-visual ones.</p>
764764

765765
The ''display: none'' value was historically used as a "toggle"
766766
to switch between showing and hiding an element.

css-env-1/Overview.bs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Group: CSSWG
88
URL: https://drafts.csswg.org/css-env-1/
99
Editor: Tab Atkins-Bittner, Google, w3cid 42199
1010
Editor: Dean Jackson, Apple, w3cid 42080
11-
Abstract: This specification defines the concept of [=environment variables=] and the ''env()'' function, which work similarly to custom properties and the ''var()'' function, but are defined globally for a document. These can be defined either by the User Agent, providing values that can be used on the page based on information the UA has special access to, or provided by the author for "global" variables that are guaranteed to be the same no matter where in the document they're used.
11+
Abstract: This specification defines the concept of [=environment variables=] and the ''env()'' function, which work similarly to custom properties and the ''var()'' function, but are defined globally for a document. These can be defined either by the user agent, providing values that can be used on the page based on information the UA has special access to, or provided by the author for "global" variables that are guaranteed to be the same no matter where in the document they're used.
1212
</pre>
1313

1414
<pre class=link-defaults>
@@ -46,7 +46,7 @@ These "global" variables have both benefits and downsides versus cascading varia
4646
they can be used in places where there is no obvious element to draw from,
4747
such as in ''@media'' rules,
4848
where the ''var()'' function would not be valid.
49-
* Information from the User Agent itself,
49+
* Information from the user agent itself,
5050
such as the margin of the viewport to avoid laying out in by default
5151
(for example, to avoid overlapping a "notch" in the screen),
5252
can be retrieved via ''env()'',
@@ -58,7 +58,7 @@ Environment Variables {#environment}
5858
A CSS <dfn for=CSS>environment variable</dfn> is a name associated with a <<declaration-value>>
5959
(a sequence of zero more CSS tokens, with almost no restrictions on what tokens can exist),
6060
similar to a [=custom property=].
61-
[=Environment variables=] can be defined by the User Agent,
61+
[=Environment variables=] can be defined by the user agent,
6262
or by the user.
6363
(In the latter case, the names are <<custom-property-name>>s,
6464
and start with `--` per standard for custom identifiers.)

css-flexbox-1/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4516,7 +4516,7 @@ Substantive Changes and Bugfixes</h4>
45164516
<li>their own axis (left/right percentages resolve against width, top/bottom resolve against height), or,
45174517
<li>the inline axis (left/right/top/bottom percentages all resolve against width)
45184518
</ul>
4519-
<p>A User Agent must choose one of these two behaviors.</p>
4519+
<p>A user agent must choose one of these two behaviors.</p>
45204520

45214521
<p class="note">Note: This variance sucks, but it accurately captures the current state of the world
45224522
(no consensus among implementations, and no consensus within the CSSWG).

0 commit comments

Comments
 (0)