Skip to content

Commit

Permalink
Merge branch 'main' into fenced-frames
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills authored Jul 24, 2023
2 parents 7da4ab6 + d479333 commit ffb765b
Show file tree
Hide file tree
Showing 1,017 changed files with 5,654 additions and 3,678 deletions.
12 changes: 12 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
system:
- package.json
- yarn.lock
- .github/**/*
- .husky/**/*
- .vscode/**/*
- .*
- scripts/**/*
- tests/**/*
- jest.config.json
- front-matter-config.json

Content:Accessibility:
- files/en-us/web/accessibility/**/*
Content:CSS:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/markdown-lint-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:

- name: Lint markdown files
run: |
yarn content fix-flaws
yarn fix:md
yarn fix:fm
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"!*.md": "prettier --ignore-unknown --write",
"*": "prettier --ignore-unknown --write",
"*.md": [
"markdownlint-cli2-fix",
"node scripts/front-matter_linter.js --fix true"
Expand Down
52 changes: 28 additions & 24 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
// This file defines our configuration for Markdownlint. See
// https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
// for more details on each rule.

{
"config": {
"default": true,
// MD001 - Heading levels should only increment by one level at a time.
// -> Disabled, as some callouts include headings.
"MD001": false,
"MD004": {
// Disabled, as some callouts include headings.
"header-increment": false,
"ul-style": {
"style": "dash"
},
"MD007": {
"ul-indent": {
"indent": 2
},
"MD010": {
"no-hard-tabs": {
"spaces_per_tab": 2
},
"MD013": false,
"MD024": {
"line-length": false,
"no-duplicate-header": {
"allow_different_nesting": true
},
"MD025": {
"single-title": {
"front_matter_title": "^\\s*title\\s*[:=]"
},
"MD026": {
"no-trailing-punctuation": {
"punctuation": ".,;:"
},
// Consecutive Notes/Callouts currently don't conform with this rule
"MD028": false,
"no-blanks-blockquote": false,
// Force ordered numbering to catch accidental list ending from indenting
"MD029": {
"ol-prefix": {
"style": "ordered"
},
"MD033": {
"no-inline-html": {
"allowed_elements": [
"a",
"abbr",
Expand Down Expand Up @@ -100,24 +103,25 @@
"var"
]
},
"MD034": false,
// Pending https://github.com/mdn/content/pull/20115
"MD037": false,
"MD040": false,
"no-bare-urls": false,
// Produces too many false positives
"no-space-in-emphasis": false,
"fenced-code-language": false,
// See https://github.com/mdn/content/pull/20026, as macros currently break this
"MD042": false,
"MD046": {
"no-empty-links": false,
"code-block-style": {
"style": "fenced"
},
"MD049": {
"emphasis-style": {
"style": "underscore"
},
"MD050": {
"strong-style": {
"style": "asterisk"
},
// MD051 - Link fragments should be valid.
// -> Disabled, as yari generates link fragments by replacing spaces with underscores, not dashes.
"MD051": false,
// Disabled, as yari generates link fragments by replacing spaces with underscores, not dashes.
"link-fragments": false,

// https://github.com/OnkarRuikar/markdownlint-rule-search-replace
"search-replace": {
"rules": [
{
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ build/
/files/en-us/_githistory.json
/tests/front-matter_test_files

# A full pass on all Markdown files is being performed.
# The following folders still need a full pass:
/files/en-us/mozilla/add-ons/webextensions/api/**/*.md

# XXX Ignored until https://github.com/prettier/prettier/issues/15032 is fixed
/files/en-us/web/javascript/reference/operators/exponentiation/index.md
/files/en-us/web/javascript/reference/operators/exponentiation_assignment/index.md
10 changes: 4 additions & 6 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
/en-US/docs/CSS/:-moz-broken /en-US/docs/Web/CSS/:-moz-broken
/en-US/docs/CSS/:-moz-drag-over /en-US/docs/Web/CSS/:-moz-drag-over
/en-US/docs/CSS/:-moz-first-node /en-US/docs/Web/CSS/:-moz-first-node
/en-US/docs/CSS/:-moz-focusring /en-US/docs/Web/CSS/:-moz-focusring
/en-US/docs/CSS/:-moz-focusring /en-US/docs/Web/CSS/:focus-visible
/en-US/docs/CSS/:-moz-full-screen /en-US/docs/Web/CSS/:fullscreen
/en-US/docs/CSS/:-moz-handler-blocked /en-US/docs/Web/CSS/:-moz-handler-blocked
/en-US/docs/CSS/:-moz-handler-crashed /en-US/docs/Web/CSS/:-moz-handler-crashed
Expand Down Expand Up @@ -2084,7 +2084,6 @@
/en-US/docs/DOM/window.URL.createObjectURL /en-US/docs/Web/API/URL/createObjectURL_static
/en-US/docs/DOM/window.URL.revokeObjectURL /en-US/docs/Web/API/URL/revokeObjectURL_static
/en-US/docs/DOM/window.alert /en-US/docs/Web/API/Window/alert
/en-US/docs/DOM/window.applicationCache /en-US/docs/Web/API/Window/applicationCache
/en-US/docs/DOM/window.atob /en-US/docs/Web/API/atob
/en-US/docs/DOM/window.back /en-US/docs/Web/API/Window/back
/en-US/docs/DOM/window.blur /en-US/docs/Web/API/Window/blur
Expand Down Expand Up @@ -2549,7 +2548,6 @@
/en-US/docs/DOM:treeWalker.whatToShow /en-US/docs/Web/API/TreeWalker/whatToShow
/en-US/docs/DOM:window /en-US/docs/Web/API/Window
/en-US/docs/DOM:window.alert /en-US/docs/Web/API/Window/alert
/en-US/docs/DOM:window.applicationCache /en-US/docs/Web/API/Window/applicationCache
/en-US/docs/DOM:window.atob /en-US/docs/Web/API/atob
/en-US/docs/DOM:window.back /en-US/docs/Web/API/Window/back
/en-US/docs/DOM:window.blur /en-US/docs/Web/API/Window/blur
Expand Down Expand Up @@ -3268,7 +3266,6 @@
/en-US/docs/Document_Object_Model_(DOM)/window.URL /en-US/docs/Web/API/URL
/en-US/docs/Document_Object_Model_(DOM)/window.URL.createObjectURL /en-US/docs/Web/API/URL/createObjectURL_static
/en-US/docs/Document_Object_Model_(DOM)/window.URL.revokeObjectURL /en-US/docs/Web/API/URL/revokeObjectURL_static
/en-US/docs/Document_Object_Model_(DOM)/window.applicationCache /en-US/docs/Web/API/Window/applicationCache
/en-US/docs/Document_Object_Model_(DOM)/window.captureEvents /en-US/docs/Web/API/Window/captureEvents
/en-US/docs/Document_Object_Model_(DOM)/window.clearImmediate /en-US/docs/Web/API/Window/clearImmediate
/en-US/docs/Document_Object_Model_(DOM)/window.clearInterval /en-US/docs/Web/API/clearInterval
Expand Down Expand Up @@ -10243,7 +10240,7 @@
/en-US/docs/Web/API/WorkerConsole.info() /en-US/docs/Web/API/console/info
/en-US/docs/Web/API/WorkerConsole.log /en-US/docs/Web/API/console/log
/en-US/docs/Web/API/WorkerGlobalScope.close /en-US/docs/Web/API/DedicatedWorkerGlobalScope/close
/en-US/docs/Web/API/WorkerGlobalScope.console /en-US/docs/Web/API/WorkerGlobalScope/console
/en-US/docs/Web/API/WorkerGlobalScope.console /en-US/docs/Web/API/console
/en-US/docs/Web/API/WorkerGlobalScope.dump /en-US/docs/Web/API/WorkerGlobalScope/dump
/en-US/docs/Web/API/WorkerGlobalScope.importScripts /en-US/docs/Web/API/WorkerGlobalScope/importScripts
/en-US/docs/Web/API/WorkerGlobalScope.location /en-US/docs/Web/API/WorkerGlobalScope/location
Expand All @@ -10262,6 +10259,7 @@
/en-US/docs/Web/API/WorkerGlobalScope/clearInterval /en-US/docs/Web/API/clearInterval
/en-US/docs/Web/API/WorkerGlobalScope/clearTimeout /en-US/docs/Web/API/clearTimeout
/en-US/docs/Web/API/WorkerGlobalScope/close /en-US/docs/Web/API/DedicatedWorkerGlobalScope/close
/en-US/docs/Web/API/WorkerGlobalScope/console /en-US/docs/Web/API/console
/en-US/docs/Web/API/WorkerGlobalScope/fetch /en-US/docs/Web/API/fetch
/en-US/docs/Web/API/WorkerGlobalScope/indexedDB /en-US/docs/Web/API/indexedDB
/en-US/docs/Web/API/WorkerGlobalScope/onclose /en-US/docs/Web/API/DedicatedWorkerGlobalScope/close
Expand Down Expand Up @@ -10693,7 +10691,6 @@
/en-US/docs/Web/API/window.URL.createObjectURL /en-US/docs/Web/API/URL/createObjectURL_static
/en-US/docs/Web/API/window.URL.revokeObjectURL /en-US/docs/Web/API/URL/revokeObjectURL_static
/en-US/docs/Web/API/window.alert /en-US/docs/Web/API/Window/alert
/en-US/docs/Web/API/window.applicationCache /en-US/docs/Web/API/Window/applicationCache
/en-US/docs/Web/API/window.atob /en-US/docs/Web/API/atob
/en-US/docs/Web/API/window.back /en-US/docs/Web/API/Window/back
/en-US/docs/Web/API/window.blur /en-US/docs/Web/API/Window/blur
Expand Down Expand Up @@ -11253,6 +11250,7 @@
/en-US/docs/Web/CSS/-webkit-user-select /en-US/docs/Web/CSS/user-select
/en-US/docs/Web/CSS/:-moz-any /en-US/docs/Web/CSS/:is
/en-US/docs/Web/CSS/:-moz-any-link /en-US/docs/Web/CSS/:any-link
/en-US/docs/Web/CSS/:-moz-focusring /en-US/docs/Web/CSS/:focus-visible
/en-US/docs/Web/CSS/:-moz-full-screen /en-US/docs/Web/CSS/:fullscreen
/en-US/docs/Web/CSS/:-moz-list-bullet /en-US/docs/Web/CSS/::-moz-list-bullet
/en-US/docs/Web/CSS/:-moz-list-number /en-US/docs/Web/CSS/::-moz-list-number
Expand Down
47 changes: 0 additions & 47 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -66684,25 +66684,6 @@
"teoli"
]
},
"Web/API/Window/applicationCache": {
"modified": "2020-12-08T02:25:04.101Z",
"contributors": [
"sideshowbarker",
"schalkneethling",
"placecarleen44",
"bershanskiy",
"alattalatta",
"chrisdavidmills",
"Sheppy",
"fscholz",
"teoli",
"ethertank",
"Jeremie",
"ebidel",
"Mgjbot",
"Kohei"
]
},
"Web/API/Window/back": {
"modified": "2020-02-23T02:06:28.448Z",
"contributors": [
Expand Down Expand Up @@ -69540,17 +69521,6 @@
"teoli"
]
},
"Web/API/WorkerGlobalScope/console": {
"modified": "2020-10-15T21:32:18.184Z",
"contributors": [
"sideshowbarker",
"fscholz",
"valentin.gosu",
"teoli",
"chrisdavidmills",
"kscarfone"
]
},
"Web/API/WorkerGlobalScope/dump": {
"modified": "2020-10-15T21:32:18.913Z",
"contributors": [
Expand Down Expand Up @@ -73733,23 +73703,6 @@
"Mw22"
]
},
"Web/CSS/:-moz-focusring": {
"modified": "2020-12-01T16:39:52.169Z",
"contributors": [
"mfluehr",
"cpmsmith",
"wbamberg",
"fscholz",
"chrisdavidmills",
"elharony",
"Enn2",
"Sebastianz",
"teoli",
"seth",
"Jonathan_Watt",
"Sheppy"
]
},
"Web/CSS/:-moz-handler-blocked": {
"modified": "2020-08-06T11:19:00.766Z",
"contributors": ["Sheppy", "wbamberg", "mfluehr", "teoli"]
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/games/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ For the tech folks, let's dig into the APIs the Web brings to the table that cat
- : The Pointer Lock API lets you lock the mouse or other pointing device within your game's interface so that instead of absolute cursor positioning you receive coordinate deltas that give you more precise measurements of what the user is doing, and prevent the user from accidentally sending their input somewhere else, thereby missing important action.
- [SVG](/en-US/docs/Web/SVG) (Scalable Vector Graphics)
- : Lets you build vector graphics that scale smoothly regardless of the size or resolution of the user's display.
- [Typed Arrays](/en-US/docs/Web/JavaScript/Typed_arrays)
- [Typed Arrays](/en-US/docs/Web/JavaScript/Guide/Typed_arrays)
- : JavaScript typed arrays give you access to raw binary data from within JavaScript; this lets you manipulate GL textures, game data, or anything else, even if it's not in a native JavaScript format.
- [Web Audio API](/en-US/docs/Web/API/Web_Audio_API)
- : This API for controlling the playback, synthesis, and manipulation of audio from JavaScript code lets you create awesome sound effects as well as play and manipulate music in real time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ page-type: guide
- : Lock the mouse or other pointing device within your game's interface.
- [SVG](/en-US/docs/Web/SVG) (Scalable Vector Graphics)
- : Build vector graphics that scale smoothly regardless of the size or resolution of the user's display.
- [Typed Arrays](/en-US/docs/Web/JavaScript/Typed_arrays)
- [Typed Arrays](/en-US/docs/Web/JavaScript/Guide/Typed_arrays)
- : Access raw binary data from within JavaScript; Manipulate GL textures, game data, or anything else.
- [Web Audio API](/en-US/docs/Web/API/Web_Audio_API)
- : Control the playback, synthesis, and manipulation of audio in real time.
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/games/techniques/audio_for_web_games/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Browser autoplay policy now affects desktop _and_ mobile browsers. There is furt
It is worth noting that autoplay with sound is allowed if:

- the User has interacted with the domain.
- on mobile the user has [added the site to their home screen](/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen).
- on mobile the user has [made the application installable](/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable).

Many browsers will ignore any requests made by your game to automatically play audio; instead playback for audio needs to be started by a user-initiated event, such as a click or tap. This means you will have to structure your audio playback to take account of that. This is usually mitigated against by loading the audio in advance and priming it on a user-initiated event.

Expand Down Expand Up @@ -131,7 +131,7 @@ Although mobile browsers can present problems, there are ways to work around the

### Audio sprites

Audio sprites borrow their name from [CSS sprites](/en-US/docs/Web/CSS/CSS_Images/Implementing_image_sprites_in_CSS), which is a visual technique for using CSS with a single graphic resource to break it into a series of sprites. We can apply the same principle to audio so that rather than having a bunch of small audio files that take time to load and play, we have one larger audio file containing all the smaller audio snippets we need. To play a specific sound from the file, we just use the known start and stop times for each audio sprite.
Audio sprites borrow their name from [CSS sprites](/en-US/docs/Web/CSS/CSS_images/Implementing_image_sprites_in_CSS), which is a visual technique for using CSS with a single graphic resource to break it into a series of sprites. We can apply the same principle to audio so that rather than having a bunch of small audio files that take time to load and play, we have one larger audio file containing all the smaller audio snippets we need. To play a specific sound from the file, we just use the known start and stop times for each audio sprite.

The advantage is that we can prime one piece of audio and have our sprites ready to go. To do this we can just play and instantly pause the larger piece of audio. You'll also reduce the number of server requests and save bandwidth.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Square tilemaps implementation: Scrolling maps"
slug: Games/Techniques/Tilemaps/Square_tilemaps_implementation:_Scrolling_maps
page-type: guide
---

{{GamesSidebar}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Square tilemaps implementation: Static maps"
slug: Games/Techniques/Tilemaps/Square_tilemaps_implementation:_Static_maps
page-type: guide
---

{{GamesSidebar}}
Expand Down
1 change: 1 addition & 0 deletions files/en-us/glossary/adobe_flash/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Adobe Flash
slug: Glossary/Adobe_Flash
page-type: glossary-definition
---

{{GlossarySidebar}}
Expand Down
1 change: 1 addition & 0 deletions files/en-us/glossary/baseline/compatibility/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Baseline (compatibility)
slug: Glossary/Baseline/Compatibility
page-type: glossary-definition
---

{{GlossarySidebar}}
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/baseline/typography/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ The **baseline** is a term used in European and West Asian typography meaning an
## See also

- [Baseline](<https://en.wikipedia.org/wiki/Baseline_(typography)>) on Wikipedia
- [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_Box_Alignment#types_of_alignment) on MDN
- [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_box_alignment#types_of_alignment) on MDN
2 changes: 1 addition & 1 deletion files/en-us/glossary/bezier_curve/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ To draw a quadratic Bézier curve, two imaginary lines are drawn, one from P<sub
## See also

- [Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve) on Wikipedia
- [Cubic Bézier timing functions in CSS](/en-US/docs/Web/CSS/easing-function#using_the_cubic-bezier_function)
- [Cubic Bézier easing functions in CSS](/en-US/docs/Web/CSS/easing-function#using_the_cubic-bezier_function)
- {{SVGAttr("keySplines")}} SVG attribute
4 changes: 2 additions & 2 deletions files/en-us/glossary/boolean/javascript/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Boolean (Javascript)
title: Boolean (JavaScript)
slug: Glossary/Boolean/JavaScript
page-type: glossary-definition
---

{{GlossarySidebar}}

A **Boolean** in Javascript is a {{Glossary("Primitive", "primitive value")}} that can be either `true` or `false`.
A **Boolean** in JavaScript is a {{Glossary("Primitive", "primitive value")}} that can be either `true` or `false`.

A {{jsxref("Boolean")}} object is a {{Glossary("wrapper")}} around a Boolean primitive.

Expand Down
7 changes: 4 additions & 3 deletions files/en-us/glossary/cross_axis/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ Alignment of items on the cross axis is achieved with the `align-items` property

### Further reading

- CSS Flexbox Guide: _[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox)_
- CSS Flexbox Guide: _[Aligning items in a flex container](/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligning_Items_in_a_Flex_Container)_
- CSS Flexbox Guide: _[Mastering wrapping of flex items](/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Mastering_Wrapping_of_Flex_Items)_
- CSS Flexbox Guide:
- [Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Basic_concepts_of_flexbox)
- [Aligning items in a flex container](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container)
- [Mastering wrapping of flex items](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Mastering_wrapping_of_flex_items)
- [Glossary](/en-US/docs/Glossary)

- {{Glossary("Flex")}}
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/endianness/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Examples with the number `0x12345678` (i.e. 305 419 896 in decimal):

- {{jsxref("ArrayBuffer")}}
- {{jsxref("DataView")}}
- [Typed Arrays](/en-US/docs/Web/JavaScript/Typed_arrays)
- [Typed Arrays](/en-US/docs/Web/JavaScript/Guide/Typed_arrays)
- [Endianness](https://en.wikipedia.org/wiki/Endianness) (Wikipedia)
- {{Glossary("Data structure")}} (Glossary)
4 changes: 2 additions & 2 deletions files/en-us/glossary/fallback_alignment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: glossary-definition

{{GlossarySidebar}}

In [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_Box_Alignment), a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fulfilled. For example, if you specify `justify-content: space-between` there must be more than one [alignment subject](/en-US/docs/Glossary/Alignment_Subject). If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below.
In [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_box_alignment), a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fulfilled. For example, if you specify `justify-content: space-between` there must be more than one [alignment subject](/en-US/docs/Glossary/Alignment_Subject). If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below.

- First baseline
- : `start`
Expand All @@ -25,4 +25,4 @@ In [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_Box_Alignment), a fallback alignm

## See also

- [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_Box_Alignment)
- [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_box_alignment)
Loading

0 comments on commit ffb765b

Please sign in to comment.