Skip to content

Commit 2d33a1c

Browse files
authored
Format all code (mdn#153)
1 parent e3768f4 commit 2d33a1c

File tree

589 files changed

+42550
-40675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

589 files changed

+42550
-40675
lines changed

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Community Participation Guidelines
22

3-
This repository is governed by Mozilla's code of conduct and etiquette guidelines.
3+
This repository is governed by Mozilla's code of conduct and etiquette guidelines.
44
For more details, please read the
5-
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
5+
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
66

77
## How to Report
8+
89
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.
910

1011
<!--

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
theme: jekyll-theme-slate
1+
theme: jekyll-theme-slate

alt-style-sheets/default.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
p {
2-
background-color: white;
3-
color: black;
4-
font-size: 14px;
5-
font-style: normal;
6-
font-weight: normal;
7-
font-family: serif;
8-
}
9-
10-
h1 {
11-
text-shadow: 2px 2px 2px #747474;
12-
text-align: center;
13-
font-weight: bold;
14-
font-size: 22px;
15-
font-family: sans-serif;
16-
}
1+
p {
2+
background-color: white;
3+
color: black;
4+
font-size: 14px;
5+
font-style: normal;
6+
font-weight: normal;
7+
font-family: serif;
8+
}
9+
10+
h1 {
11+
text-shadow: 2px 2px 2px #747474;
12+
text-align: center;
13+
font-weight: bold;
14+
font-size: 22px;
15+
font-family: sans-serif;
16+
}

alt-style-sheets/fancy.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
p {
2-
border-style: groove;
3-
border-width: 2px;
4-
background-color: #8d0019;
5-
color: #fcff00;
6-
font-size: 14px;
7-
font-family: Georgia, "Times New Roman", Times, serif;
8-
}
9-
10-
h1 {
11-
background-color: #000c6e;
12-
color: #ff8100;
13-
font-weight: bold;
14-
font-size: 20px;
15-
font-family: "Zapf Chancery", "Comic Sans MS", cursive;
16-
}
1+
p {
2+
border-style: groove;
3+
border-width: 2px;
4+
background-color: #8d0019;
5+
color: #fcff00;
6+
font-size: 14px;
7+
font-family: Georgia, "Times New Roman", Times, serif;
8+
}
9+
10+
h1 {
11+
background-color: #000c6e;
12+
color: #ff8100;
13+
font-weight: bold;
14+
font-size: 20px;
15+
font-family: "Zapf Chancery", "Comic Sans MS", cursive;
16+
}

alt-style-sheets/index.html

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
1-
<html lang="en-us">
2-
<head>
3-
<title>Alternate Style Sheets example</title>
4-
<link href="default.css" rel="stylesheet" title="Default Style">
5-
<link href="simple.css" rel="alternate stylesheet" title="Simple">
6-
<link href="fancy.css" rel="alternate stylesheet" title="Fancy">
7-
</head>
8-
<body>
9-
<h1>About alternative style sheets</h1>
10-
<p>Firefox offers support for <em>alternative style sheets</em>. Pages that provide alternative style sheets allow the user to select the style in which the page is displayed using the View>Page Style submenu. This provides a way for users to see multiple versions of a page, based on their needs or preferences.</p>
11-
12-
<p>A web page can use the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link">&lt;link&gt;</a> element to add alternative style sheets to a document.</p>
13-
14-
<h1>Try it out!</h1>
15-
<p>Go to the View>Page Style submenu and select a different style to watch this page's look change!</p>
16-
</body>
17-
</html>
1+
<html lang="en-us">
2+
<head>
3+
<title>Alternate Style Sheets example</title>
4+
<link href="default.css" rel="stylesheet" title="Default Style" />
5+
<link href="simple.css" rel="alternate stylesheet" title="Simple" />
6+
<link href="fancy.css" rel="alternate stylesheet" title="Fancy" />
7+
</head>
8+
<body>
9+
<h1>About alternative style sheets</h1>
10+
<p>
11+
Firefox offers support for <em>alternative style sheets</em>. Pages that
12+
provide alternative style sheets allow the user to select the style in
13+
which the page is displayed using the View>Page Style submenu. This
14+
provides a way for users to see multiple versions of a page, based on
15+
their needs or preferences.
16+
</p>
17+
18+
<p>
19+
A web page can use the
20+
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link"
21+
>&lt;link&gt;</a
22+
>
23+
element to add alternative style sheets to a document.
24+
</p>
25+
26+
<h1>Try it out!</h1>
27+
<p>
28+
Go to the View>Page Style submenu and select a different style to watch
29+
this page's look change!
30+
</p>
31+
</body>
32+
</html>

alt-style-sheets/simple.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
p {
2-
font-size: 12px;
3-
font-family: sans-serif;
4-
}
5-
6-
h1 {
7-
font-weight: bold;
8-
font-size: 16px;
9-
font-family: sans-serif;
10-
}
1+
p {
2+
font-size: 12px;
3+
font-family: sans-serif;
4+
}
5+
6+
h1 {
7+
font-weight: bold;
8+
font-size: 16px;
9+
font-family: sans-serif;
10+
}

animation-frames-timing-function/index-transitions.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en-us">
33
<head>
44
<meta charset="utf-8" />
@@ -45,8 +45,17 @@
4545
</style>
4646
</head>
4747
<body>
48-
<div class="div1"><p>transition-timing-function: frames(10)<p></div>
49-
<div class="div2"><p>transition-timing-function: steps(10);<p></div>
50-
<div class="div3"><p>transition-timing-function: ease-in;<p></div>
48+
<div class="div1">
49+
<p>transition-timing-function: frames(10)</p>
50+
<p></p>
51+
</div>
52+
<div class="div2">
53+
<p>transition-timing-function: steps(10);</p>
54+
<p></p>
55+
</div>
56+
<div class="div3">
57+
<p>transition-timing-function: ease-in;</p>
58+
<p></p>
59+
</div>
5160
</body>
5261
</html>
Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en-us">
33
<head>
44
<meta charset="utf-8" />
@@ -23,37 +23,39 @@
2323
left: 10px;
2424
color: white;
2525
}
26-
2726
</style>
2827
</head>
2928
<body>
30-
<div class="div1"><p>transition-timing-function: frames(10)<p></div>
31-
<div class="div2"><p>transition-timing-function: steps(10);<p></div>
32-
<div class="div3"><p>transition-timing-function: ease-in;<p></div>
29+
<div class="div1">
30+
<p>transition-timing-function: frames(10)</p>
31+
<p></p>
32+
</div>
33+
<div class="div2">
34+
<p>transition-timing-function: steps(10);</p>
35+
<p></p>
36+
</div>
37+
<div class="div3">
38+
<p>transition-timing-function: ease-in;</p>
39+
<p></p>
40+
</div>
3341

3442
<script>
35-
36-
var easingFunctions = [
37-
'frames(10)',
38-
'steps(10)',
39-
'ease-in'
40-
]
43+
var easingFunctions = ["frames(10)", "steps(10)", "ease-in"];
4144

4245
var keyFrames = [
43-
{ width: '0%', background : 'red'},
44-
{ width: '100%', background : 'blue'},
45-
]
46+
{ width: "0%", background: "red" },
47+
{ width: "100%", background: "blue" },
48+
];
4649

47-
var divs = document.querySelectorAll('div');
50+
var divs = document.querySelectorAll("div");
4851

49-
for(var i = 0; i < divs.length; i++) {
52+
for (var i = 0; i < divs.length; i++) {
5053
divs[i].animate(keyFrames, {
51-
easing : easingFunctions[i],
52-
duration : 5000,
53-
iterations: Infinity
54+
easing: easingFunctions[i],
55+
duration: 5000,
56+
iterations: Infinity,
5457
});
5558
}
56-
5759
</script>
5860
</body>
5961
</html>

animation-frames-timing-function/index.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en-us">
33
<head>
44
<meta charset="utf-8" />
@@ -52,8 +52,17 @@
5252
</style>
5353
</head>
5454
<body>
55-
<div class="div1"><p>animation-timing-function: frames(10)<p></div>
56-
<div class="div2"><p>animation-timing-function: steps(10);<p></div>
57-
<div class="div3"><p>animation-timing-function: ease-in;<p></div>
55+
<div class="div1">
56+
<p>animation-timing-function: frames(10)</p>
57+
<p></p>
58+
</div>
59+
<div class="div2">
60+
<p>animation-timing-function: steps(10);</p>
61+
<p></p>
62+
</div>
63+
<div class="div3">
64+
<p>animation-timing-function: ease-in;</p>
65+
<p></p>
66+
</div>
5867
</body>
5968
</html>

assets/playable.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
var section = document.querySelector('section');
2-
var editable = document.querySelector('.editable');
3-
var textareaHTML = document.querySelector('.playable-html');
4-
var textareaCSS = document.querySelector('.playable-css');
5-
var reset = document.getElementById('reset');
1+
var section = document.querySelector("section");
2+
var editable = document.querySelector(".editable");
3+
var textareaHTML = document.querySelector(".playable-html");
4+
var textareaCSS = document.querySelector(".playable-css");
5+
var reset = document.getElementById("reset");
66
var htmlCode = textareaHTML.value;
77
var cssCode = textareaCSS.value;
88

99
let editorHeading = document.createElement("h4");
1010
editorHeading.innerHTML = "Interactive editor";
11-
document.querySelector('body').insertBefore(editorHeading,textareaCSS);
11+
document.querySelector("body").insertBefore(editorHeading, textareaCSS);
1212

1313
function fillCode() {
14-
editable.innerHTML = textareaCSS.value;
15-
section.innerHTML = textareaHTML.value;
14+
editable.innerHTML = textareaCSS.value;
15+
section.innerHTML = textareaHTML.value;
1616
}
1717

18-
reset.addEventListener('click', function () {
19-
textareaHTML.value = htmlCode;
20-
textareaCSS.value = cssCode;
21-
fillCode();
18+
reset.addEventListener("click", function () {
19+
textareaHTML.value = htmlCode;
20+
textareaCSS.value = cssCode;
21+
fillCode();
2222
});
2323

24-
25-
textareaHTML.addEventListener('input', fillCode);
26-
textareaCSS.addEventListener('input', fillCode);
27-
window.addEventListener('load', fillCode);
24+
textareaHTML.addEventListener("input", fillCode);
25+
textareaCSS.addEventListener("input", fillCode);
26+
window.addEventListener("load", fillCode);

0 commit comments

Comments
 (0)