Skip to content

Commit

Permalink
Comment out ellipsis in code blocks (#18535)
Browse files Browse the repository at this point in the history
* Comment out ellipsis in code blocks

* Apply suggestions from code review

Co-authored-by: Jean-Yves Perrier <[email protected]>

* Update files/en-us/web/css/@media/-webkit-device-pixel-ratio/index.md

Co-authored-by: Jean-Yves Perrier <[email protected]>

Co-authored-by: Jean-Yves Perrier <[email protected]>
  • Loading branch information
OnkarRuikar and teoli2003 authored Jul 20, 2022
1 parent 921172f commit 97783d1
Show file tree
Hide file tree
Showing 31 changed files with 108 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const lightProbe = await xrSession.requestLightProbe();
function onXRFrame(time, xrFrame) {
let lightEstimate = xrFrame.getLightEstimate(lightProbe);

// Render lights ...
// Render lights

// Available properties
lightEstimate.primaryLightDirection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const lightProbe = await xrSession.requestLightProbe();
function onXRFrame(time, xrFrame) {
let lightEstimate = xrFrame.getLightEstimate(lightProbe);

// Render lights ...
// Render lights

// Available properties
lightEstimate.primaryLightDirection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const lightProbe = await xrSession.requestLightProbe();
function onXRFrame(time, xrFrame) {
let lightEstimate = xrFrame.getLightEstimate(lightProbe);

// Render lights using lightEstimate.sphericalHarmonicsCoefficients ...
// Render lights using lightEstimate.sphericalHarmonicsCoefficients
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Some devices don't support foveated rendering. In that case `fixedFoveation` is
The `fixedFoveation` property allows you to set the level of foveation at runtime and for each frame. To set the maximum foveation for a given {{domxref("XRProjectionLayer")}}, use a value of `1`.

```js
let glProjectionLayer = glBinding.createProjectionLayer(/* ... */);
let glProjectionLayer = glBinding.createProjectionLayer(/* */);
glProjectionLayer.fixedFoveation = 1; // maximum foveation
```

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrreferencespace/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ There are two situations in which you need to obtain an `XRReferenceSpace`. The
```js
xrSession.requestReferenceSpace("local").then((refSpace) => {
xrReferenceSpace = refSpace;
/* ... */
//
});
```

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/xrrigidtransform/inverse/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ for (let view of pose.view) {
let viewport = glLayer.getViewport(view);
gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height);

/* ... */
//

mat4.multiply(modelViewMatrix, view.transform.inverse.matrix, objectMatrix);
gl.uniformMatrix4fv(programInfo.uniformLocations.modelViewMatrix,
false, modelViewMatrix);

/* ... */
//
}
```

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrsystem/devicechange_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ You can also use the `ondevicechange` event handler property to set a single han
```js
if (navigator.xr) {
navigator.xr.ondevicechange = event => {
/* ... etc ... */
//
};
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function onXRSessionStarted(xrSession) {
centralAngle : 60 * Math.PI / 180,
aspectRatio : 2,
radius : 2,
transform : new XRRigidTransform(/* ... */),
transform : new XRRigidTransform(/* */),
});

xrSession.updateRenderState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const session = navigator.xr.requestSession("immersive-ar", {

const glBinding = new XRWebGLBinding(session, gl);

// ...
//

// Obtain depth information in an active and animated frame
function rafCallback(time, frame) {
Expand All @@ -71,7 +71,7 @@ function rafCallback(time, frame) {
if (depthInformation) {
// Do something with the depth information
// gl.bindTexture(gl.TEXTURE_2D, depthInformation.texture);
// ...
//
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions files/en-us/web/api/xsltprocessor/generating_html/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The XSL Stylesheet used will need to have two namespaces - one for the XSLT elem
xmlns:myNS="http://devedge.netscape.com/2002/de">

<xsl:output method="html"/>
...
</xsl:stylesheet version="1.0">
```

Expand All @@ -46,7 +46,7 @@ A template matching the root node of the XML document is created and used to cre
**Figure 4: Creating the basic HTML document**

```xml
...
<xsl:template match="/">
<html>

Expand Down Expand Up @@ -80,15 +80,15 @@ A template matching the root node of the XML document is created and used to cre

</html>
</xsl:template>
...
```

Three more `xsl:template`'s are needed to complete the example. The first `xsl:template` is used for the author nodes, while the second one processes the body node. The third template has a general matching rule which will match any node and any attribute. It is needed in order to preserve the HTML elements in the XML document, since it matches all of them and copies them out into the HTML document the transformation creates.

**Figure 5: Final 3 Templates**

```xml
...
<xsl:template match="myNS:Author">
-- <xsl:value-of select="." />

Expand All @@ -112,7 +112,7 @@ Three more `xsl:template`'s are needed to complete the example. The first `xsl:t
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
...
```

The final XSLT stylesheet looks as follows:
Expand Down
12 changes: 6 additions & 6 deletions files/en-us/web/css/@media/-webkit-device-pixel-ratio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ The `-webkit-device-pixel-ratio` feature is specified as a {{cssxref("&lt;number

```css
/* A unit of "dppx" is implied: */
@media (-webkit-min-device-pixel-ratio: 2) { ... }
/* ... is equivalent to: */
@media (min-resolution: 2dppx) { ... }
@media (-webkit-min-device-pixel-ratio: 2) { /**/ }
/* It is equivalent to: */
@media (min-resolution: 2dppx) { /**/ }

/* Similarly: */
@media (-webkit-max-device-pixel-ratio: 2) { ... }
/* ... is equivalent to: */
@media (max-resolution: 2dppx) { ... }
@media (-webkit-max-device-pixel-ratio: 2) { /**/ }
/* It is equivalent to: */
@media (max-resolution: 2dppx) { /**/ }
```

## Examples
Expand Down
9 changes: 6 additions & 3 deletions files/en-us/web/css/_colon_is/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ In CSS when using a selector list, if any of the selectors are invalid then the

```css
:is(:valid, :unsupported) {
...
/**/
}
```

Will still parse correctly and match `:valid` even in browsers which don't support `:unsupported`, whereas:

```css
:valid, :unsupported {
...
/**/
}
```

Expand Down Expand Up @@ -179,19 +179,22 @@ For example, without `:is()`, styling all the {{HTMLElement("h1")}} elements at
h1 {
font-size: 30px;
}

/* Level 1 */
section h1, article h1, aside h1, nav h1 {
font-size: 25px;
}

/* Level 2 */
section section h1, section article h1, section aside h1, section nav h1,
article section h1, article article h1, article aside h1, article nav h1,
aside section h1, aside article h1, aside aside h1, aside nav h1,
nav section h1, nav article h1, nav aside h1, nav nav h1 {
font-size: 20px;
}

/* Level 3 */
/* ... don't even think about it! */
/* don't even think about it! */
```

Using `:is()`, though, it's much easier:
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/css/_colon_not/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The `:not()` pseudo-class requires a comma-separated list of one or more selecto

There are several unusual effects and outcomes when using `:not()` that you should keep in mind when using it:

- The `:not` pseudo-class may not be nested, which means that `:not(:not(...))` is invalid.
- The `:not` pseudo-class may not be nested, which means that `:not(:not( ))` is invalid.
- Useless selectors can be written using this pseudo-class. For example, `:not(*)` matches any element which is not an element, which is obviously nonsense, so the accompanying rule will never be applied.
- This pseudo-class can increase the [specificity](/en-US/docs/Web/CSS/Specificity) of a rule. For example, `#foo:not(#bar)` will match the same element as the simpler `#foo`, but has the higher specificity of two `id` selectors.
- The specificity of the `:not()` pseudo-class is replaced by the specificity of the most specific selector in its comma-separated argument of selectors; providing the same specificity as if it had been written [`:not(:is(argument))`](/en-US/docs/Web/CSS/:is).
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/css/_colon_where/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ In CSS when using a selector list, if any of the selectors are invalid then the

```css
:where(:valid, :unsupported) {
...
/**/
}
```

Will still parse correctly and match `:valid` even in browsers which don't support `:unsupported`, whereas:

```css
:valid, :unsupported {
...
/**/
}
```

Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/css/_doublecolon_placeholder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This example shows some of the adjustments that you can make to the styles of pl
#### HTML

```html
<input placeholder="Type here...">
<input placeholder="Type here">
```

#### CSS
Expand All @@ -103,8 +103,8 @@ Some browsers (such as Firefox) set the default {{cssxref("opacity")}} of placeh
#### HTML

```html
<input placeholder="Default opacity...">
<input placeholder="Full opacity..." class="force-opaque">
<input placeholder="Default opacity">
<input placeholder="Full opacity" class="force-opaque">
```

#### CSS
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/css/alternative_style_sheets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Firefox lets the user select the stylesheet using the _View > Page Style_ submen

## An example: specifying the alternative stylesheets

The alternate stylesheets are commonly specified using a {{HTMLElement("link")}} element with `rel="alternate stylesheet"` and `title="..."` attributes. For example:
The alternate stylesheets are commonly specified using a {{HTMLElement("link")}} element with `rel="alternate stylesheet"` and `title=""` attributes. For example:

```html
<link href="reset.css" rel="stylesheet" type="text/css">
Expand All @@ -41,8 +41,8 @@ No matter what style is selected, the rules from the reset.css stylesheet will a
Any stylesheet in a document falls into one of the following categories:

- **Persistent** (no `rel="alternate"`, no `title=""`): always applies to the document.
- **Preferred** (no `rel="alternate"`, with `title="..."` specified): applied by default, but {{domxref("StyleSheet.disabled", "disabled", "", 1)}} if an alternate stylesheet is selected. **There can only be one preferred stylesheet**, so providing stylesheets with different title attributes will cause some of them to be ignored.
- **Alternate** (`rel="alternate stylesheet"`, `title="..."` must be specified): disabled by default, can be selected.
- **Preferred** (no `rel="alternate"`, with `title=""` specified): applied by default, but {{domxref("StyleSheet.disabled", "disabled", "", 1)}} if an alternate stylesheet is selected. **There can only be one preferred stylesheet**, so providing stylesheets with different title attributes will cause some of them to be ignored.
- **Alternate** (`rel="alternate stylesheet"`, `title=""` must be specified): disabled by default, can be selected.

When style sheets are referenced with a `title` attribute on the {{HTMLElement("link", "&lt;link rel=\"stylesheet\"&gt;")}} or {{HTMLElement("style")}} element, the title becomes one of the choices offered to the user. Style sheets linked with the same `title` are part of the same choice. Style sheets linked without a `title` attribute are always applied.

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/css/border-radius/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ For example:
```css
border-radius: 1em/5em;

/* ... is equivalent to: */
/* It is equivalent to: */
border-top-left-radius: 1em 5em;
border-top-right-radius: 1em 5em;
border-bottom-right-radius: 1em 5em;
Expand All @@ -173,7 +173,7 @@ border-bottom-left-radius: 1em 5em;
```css
border-radius: 4px 3px 6px / 2px 4px;

/* ... is equivalent to: */
/* It is equivalent to: */
border-top-left-radius: 4px 2px;
border-top-right-radius: 3px 4px;
border-bottom-right-radius: 6px 2px;
Expand Down
33 changes: 17 additions & 16 deletions files/en-us/web/css/box-decoration-break/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,23 @@ The `box-decoration-break` property is specified as one of the keyword values li

An inline element that contains line breaks styled with:

```css
.example {
background: linear-gradient(to bottom right, yellow, green);
box-shadow:
8px 8px 10px 0px deeppink,
-5px -5px 5px 0px blue,
5px 5px 15px 0px yellow;
padding: 0em 1em;
border-radius: 16px;
border-style: solid;
margin-left: 10px;
font: 24px sans-serif;
line-height: 2;
}

...
```html
<style>
.example {
background: linear-gradient(to bottom right, yellow, green);
box-shadow:
8px 8px 10px 0px deeppink,
-5px -5px 5px 0px blue,
5px 5px 15px 0px yellow;
padding: 0em 1em;
border-radius: 16px;
border-style: solid;
margin-left: 10px;
font: 24px sans-serif;
line-height: 2;
}
</style>
<span class="example">The<br>quick<br>orange fox</span>
```

Expand Down
18 changes: 9 additions & 9 deletions files/en-us/web/css/content-visibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ section {
contain-intrinsic-size: 0 500px;
}

<section>...
<section>...
<section>...
<section>...
...
<section>
<section>
<section>
<section>
```

### Using hidden to manually manage visibility
Expand All @@ -89,10 +89,10 @@ The following example shows that it is possible to manage visibility in script.
contain: style layout paint;
}

<div class=hidden>...
<div class=visible>...
<div class=hidden>...
<div class=hidden>...
<div class=hidden>
<div class=visible>
<div class=hidden>
<div class=hidden>
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Specifying multiple backgrounds is easy:

```css
.myclass {
background: background1, background2, ..., backgroundN;
background: background1, background2, /* … ,*/ backgroundN;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ If the intent is to create a "blanket" style that will apply to all targeted ele
In the following example, there are five links that point to elements in the same document. Selecting the "First" link, for example, will cause `<h1 id="one">` to become the target element. Note that the document may jump to a new scroll position, since target elements are placed on the top of the browser window if possible.

```html
<h4 id="one">...</h4> <p id="two">...</p>
<div id="three">...</div> <a id="four">...</a> <em id="five">...</em>
<h4 id="one"></h4> <p id="two"></p>
<div id="three"></div> <a id="four"></a> <em id="five"></em>

<a href="#one">First</a>
<a href="#two">Second</a>
Expand Down
Loading

0 comments on commit 97783d1

Please sign in to comment.