Skip to content

Commit 1721dd5

Browse files
authored
fix: syntax errors (mdn#695)
The PR: - fixes syntax errors - trailing spaces were removed - adds `.prettierignore` files so Prettier can be run -
1 parent 6191b97 commit 1721dd5

File tree

5 files changed

+101
-73
lines changed

5 files changed

+101
-73
lines changed

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This .prettierignore file uses .gitignore syntax
2+
# see https://prettier.io/docs/en/ignore.html#ignoring-files-prettierignore
3+
4+
/css/introduction-to-css/debugging-css/style.css
5+
/html/introduction-to-html/debugging-html/debug-example.html
6+
/tools-testing/cross-browser-testing/javascript/broken-js-test.js

css/introduction-to-css/fundamental-css-comprehension-finished/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h2>Chris Mills</h2>
1414
</header>
1515
<article>
1616
<img src="chris.jpg" alt="A picture of Chris - a man with glasses, a beard, and a silly wooly hat">
17-
<p>50 My Street</br>
17+
<p>50 My Street<br>
1818
The Town<br>
1919
Gray Peach<br>
2020
UK<br>

css/styling-text/typesetting-a-homepage-finished/original-font-files/Lovato Light-Webfont/Reference/How_to_use_webfonts.html

+25-26
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
del, dfn, em, font, img, ins, kbd, q, s, samp,
1616
small, strike, strong, sub, sup, tt, var,
1717
b, u, i, center, dl, dt, dd, ol, ul, li,
18-
fieldset, form, label, legend, table,
19-
caption, tbody, tfoot, thead, tr, th, td
18+
fieldset, form, label, legend, table,
19+
caption, tbody, tfoot, thead, tr, th, td
2020
{margin: 0;padding: 0;border: 0;outline: 0;
2121
font-size: 100%;vertical-align: baseline;
2222
background: transparent;}
@@ -29,7 +29,7 @@
2929
ins {text-decoration: none;}
3030
del {text-decoration: line-through;}
3131
table {border-collapse: collapse;border-spacing: 0;}
32-
32+
3333
/*-- GRID -----*/
3434
.section {margin-bottom: 18px;
3535
}
@@ -38,7 +38,7 @@
3838

3939
.section .firstcolumn,
4040
.section .firstcol {margin-left: 0;}
41-
41+
4242
.grid1, .grid1_2cols, .grid1_3cols, .grid1_4cols, .grid2, .grid2_3cols, .grid2_4cols, .grid3, .grid3_2cols, .grid3_4cols, .grid4, .grid4_3cols, .grid5, .grid5_2cols, .grid5_3cols, .grid5_4cols, .grid6, .grid6_4cols, .grid7, .grid7_2cols, .grid7_3cols, .grid7_4cols, .grid8, .grid8_3cols, .grid9, .grid9_2cols, .grid9_4cols, .grid10, .grid10_3cols, .grid10_4cols, .grid11, .grid11_2cols, .grid11_3cols, .grid11_4cols, .grid12
4343
{margin-left: 15px;float: left;display: inline; overflow: hidden;}
4444
.width5, .grid5, .span-5 {width: 335px;}
@@ -56,7 +56,7 @@
5656
.width7_3cols,.grid7_3cols {width: 148px;}
5757
.width7_4cols,.grid7_4cols {width: 107px;}
5858
.input_width7 {width: 469px;}
59-
59+
6060
/*-- STYLES -----*/
6161
body {
6262
color: #000;
@@ -84,7 +84,7 @@
8484
width: 865px;
8585
margin: 0px auto;
8686
}
87-
87+
8888

8989

9090
#header {
@@ -95,9 +95,9 @@
9595
text-indent:-9999px;
9696
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASoAAABtCAMAAAAhztx9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFzen3mNLwDCc17fj8GVRwUbXlLprOrNzyesbrEjtOZb3oJXulP63iAAAA////MqfgopnD5wAABSNJREFUeNrs2u1yqyAQBmBARATU+7/bo6CRTwMp7ZnJvPurjUbrU1gWkGyIyiAgABWoQAUqUIEKASpQgQpUoAIVAlSgAhWoQAUqxJdSCbYsHFQ1MS/Lr1h9IRU7qBZQVVNpUL0PDao2K1BVJ/ZjKORdyb6SSiwLc0VDT6uvohKcMS72H/gyn0VDx7Lhq6hsM2LiyFZ6404KrSobzuawWoQ4pRhyVZnKdj7b/djMO1btX0V197m9UbHe5cJ3jYB7Wj873TwL1FUVw+CR1DEHrMT6jct+59Ke1qD6nwG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JpwVjEo8ZT+tVnagqVkF53GFrqILZn927IVsbVZB0lJ+A4nqchlTJKmgvqvdr6wGVYHVUZJikm/sZ5ZbJZSuV8pY6g2opmbqQ9WFt3U2RulC93bHhaY+toIrryWlrpdq8tmgz1zAVqNwKfdolvehC9XYfkL+tWiuo6NZONXqNka7BYg3JzM2f9gE7Ub3ZXU5qCV1DJQOradw+oHL1pcmtwZPMuPEwV2/ZXY7fUUhaln1nYc69s5B9aSE9S+cmy9S+saDCfSZVeokgefHAvt9gXpOUaXqdl1xhTN5ZGF/vLJimRRgEqEAFKlCBClQIUIEKVKACFahAhQAVqEAFKlCBCgEqUIEKVKACFQJUoAIVqEAFKgSoQAUqUIEKVKBCgApUfx3/BBgAeuw63hnBp0AAAAAASUVORK5CYII=) no-repeat left center;
9797
background-color: #31a7e0;
98-
98+
9999
}
100-
100+
101101
#main_content {
102102
background-color: #fff;
103103
padding: 20px 20px 20px;
@@ -120,15 +120,15 @@
120120
overflow: auto;
121121
}
122122

123-
.box {
124-
padding: 18px;
125-
margin-bottom: 18px;
126-
background: #eee;
123+
.box {
124+
padding: 18px;
125+
margin-bottom: 18px;
126+
background: #eee;
127127
}
128128
.bottom,.last {margin-bottom:0 !important; padding-bottom:0 !important;}
129-
130129

131-
130+
131+
132132
p{
133133
line-height: 1.2em;
134134
margin-bottom: 18px;
@@ -141,16 +141,16 @@
141141
font-size: 15px;
142142
margin-top: 18px;
143143
}
144-
144+
145145
.sidebar p{
146146
font-size: 12px;
147147
line-height: 1.4em;
148148
}
149-
149+
150150
</style>
151151

152152
<title>How to Use Webfonts</title>
153-
153+
154154
</head>
155155

156156
<body>
@@ -162,18 +162,18 @@
162162
<div class="section">
163163
<div class="grid7 firstcol">
164164
<h1>Installing Webfonts</h1>
165-
165+
166166
<p>Webfonts are supported by all major browser platforms but not all in the same way. There are currently four different font formats that must be included in order to target all browsers. This includes TTF, WOFF, EOT and SVG.</p>
167-
167+
168168
<h2>1. Upload your webfonts</h2>
169169
<p>You must upload your webfont kit to your website. They should be in or near the same directory as your CSS files.</p>
170-
170+
171171
<h2>2. Include the webfont stylesheet</h2>
172172
<p>A special CSS @font-face declaration helps the various browsers select the appropriate font it needs without causing you a bunch of headaches. Learn more about this syntax by reading the <a href="http://www.fontspring.com/blog/further-hardening-of-the-bulletproof-syntax">Fontspring blog post</a> about it. The code for it is as follows:</p>
173173

174174

175175
<code>
176-
@font-face{
176+
@font-face{
177177
font-family: 'MyWebFont';
178178
src: url('WebFont.eot');
179179
src: url('WebFont.eot?#iefix') format('embedded-opentype'),
@@ -192,7 +192,7 @@ <h2>3. Modify your own stylesheet</h2>
192192
<h2>4. Test</h2>
193193
<p>Getting webfonts to work cross-browser <em>can</em> be tricky. Use the information in the sidebar to help you if you find that fonts aren't loading in a particular browser.</p>
194194
</div>
195-
195+
196196
<div class="grid5 sidebar">
197197
<div class="box">
198198
<h2>Troubleshooting<br />Font-Face Problems</h2>
@@ -220,11 +220,10 @@ <h3>Fonts not loading in IE9</h3>
220220
</div>
221221
</div>
222222
</div>
223-
223+
224224
</div>
225-
225+
226226
</div>
227-
228-
</div>
227+
229228
</body>
230229
</html>
+68-46
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en-us">
33
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width">
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width" />
66
<title>Full built-in validation example</title>
77
<style>
88
form {
@@ -19,7 +19,7 @@
1919
input[type="number"],
2020
textarea,
2121
fieldset {
22-
width : 100%;
22+
width: 100%;
2323
border: 1px solid #333;
2424
box-sizing: border-box;
2525
}
@@ -34,53 +34,75 @@
3434
</style>
3535
</head>
3636

37-
<body>
38-
<form>
39-
<p>
37+
<body>
38+
<form>
4039
<fieldset>
41-
<legend>Do you have a driver's license?<span aria-label="required">*</span></legend>
40+
<legend>
41+
Do you have a driver's license?<span aria-label="required">*</span>
42+
</legend>
4243
<!-- While only one radio button in a same-named group can be selected at a time,
43-
and therefore only one radio button in a same-named group having the "required"
44-
attribute suffices in making a selection a requirement -->
45-
<input type="radio" required name="driver" id="r1" value="yes"><label for="r1">Yes</label>
46-
<input type="radio" required name="driver" id="r2" value="no"><label for="r2">No</label>
44+
and therefore only one radio button in a same-named group having the "required"
45+
attribute suffices in making a selection a requirement -->
46+
<input type="radio" required name="driver" id="r1" value="yes" /><label
47+
for="r1"
48+
>Yes</label
49+
>
50+
<input type="radio" required name="driver" id="r2" value="no" /><label
51+
for="r2"
52+
>No</label
53+
>
4754
</fieldset>
48-
</p>
49-
<p>
50-
<label for="n1">How old are you?</label>
51-
<!-- The pattern attribute can act as a fallback for browsers which
55+
<p>
56+
<label for="n1">How old are you?</label>
57+
<!-- The pattern attribute can act as a fallback for browsers which
5258
don't implement the number input type but support the pattern attribute.
5359
Please note that browsers that support the pattern attribute will make it
5460
fail silently when used with a number field.
5561
Its usage here acts only as a fallback -->
56-
<input type="number" min="12" max="120" step="1" id="n1" name="age"
57-
pattern="\d+">
58-
</p>
59-
<p>
60-
<label for="t1">What's your favorite fruit?<span aria-label="required">*</span></label>
61-
<input type="text" id="t1" name="fruit" list="l1" required
62-
pattern="[Bb]anana|[Cc]herry|[Aa]pple|[Ss]trawberry|[Ll]emon|[Oo]range">
63-
<datalist id="l1">
64-
<option>Banana</option>
65-
<option>Cherry</option>
66-
<option>Apple</option>
67-
<option>Strawberry</option>
68-
<option>Lemon</option>
69-
<option>Orange</option>
70-
</datalist>
71-
</p>
72-
<p>
73-
<label for="t2">What's your e-mail address?</label>
74-
<input type="email" id="t2" name="email">
75-
</p>
76-
<p>
77-
<label for="t3">Leave a short message</label>
78-
<textarea id="t3" name="msg" maxlength="140" rows="5"></textarea>
79-
</p>
80-
<p>
81-
<button>Submit</button>
82-
</p>
83-
</form>
84-
</body>
85-
62+
<input
63+
type="number"
64+
min="12"
65+
max="120"
66+
step="1"
67+
id="n1"
68+
name="age"
69+
pattern="\d+"
70+
/>
71+
</p>
72+
<p>
73+
<label for="t1"
74+
>What's your favorite fruit?<span aria-label="required"
75+
>*</span
76+
></label
77+
>
78+
<input
79+
type="text"
80+
id="t1"
81+
name="fruit"
82+
list="l1"
83+
required
84+
pattern="[Bb]anana|[Cc]herry|[Aa]pple|[Ss]trawberry|[Ll]emon|[Oo]range"
85+
/>
86+
<datalist id="l1">
87+
<option>Banana</option>
88+
<option>Cherry</option>
89+
<option>Apple</option>
90+
<option>Strawberry</option>
91+
<option>Lemon</option>
92+
<option>Orange</option>
93+
</datalist>
94+
</p>
95+
<p>
96+
<label for="t2">What's your e-mail address?</label>
97+
<input type="email" id="t2" name="email" />
98+
</p>
99+
<p>
100+
<label for="t3">Leave a short message</label>
101+
<textarea id="t3" name="msg" maxlength="140" rows="5"></textarea>
102+
</p>
103+
<p>
104+
<button>Submit</button>
105+
</p>
106+
</form>
107+
</body>
86108
</html>

html/forms/text-example/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
placeholder="lowercase, 4-8 characters"
3939
pattern="[a-z]{4,8}">
4040
</div>
41+
<div>
4142
<span class="validity"></span>
4243
</div>
4344
<div>

0 commit comments

Comments
 (0)