Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
/en-US/docs/CSS/Pseudo-elements /en-US/docs/Web/CSS/Pseudo-elements
/en-US/docs/CSS/Replaced_element /en-US/docs/Web/CSS/Replaced_element
/en-US/docs/CSS/Scaling_background_images /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Resizing_background_images
/en-US/docs/CSS/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds
/en-US/docs/CSS/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds
/en-US/docs/CSS/Shorthand_properties /en-US/docs/Web/CSS/CSS_cascade/Shorthand_properties
/en-US/docs/CSS/Specificity /en-US/docs/Web/CSS/CSS_cascade/Specificity
/en-US/docs/CSS/Syntax /en-US/docs/Web/CSS/CSS_syntax/Syntax
Expand Down Expand Up @@ -11992,6 +11992,7 @@
/en-US/docs/Web/CSS/Reference/Mozilla_Extensions /en-US/docs/Web/CSS/Mozilla_Extensions
/en-US/docs/Web/CSS/Reference/Webkit_Extensions /en-US/docs/Web/CSS/WebKit_Extensions
/en-US/docs/Web/CSS/Reference/object-position /en-US/docs/Web/CSS/object-position
/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds
/en-US/docs/Web/CSS/Selector_lists /en-US/docs/Web/CSS/Selector_list
/en-US/docs/Web/CSS/Selectors /en-US/docs/Web/CSS/CSS_selectors
/en-US/docs/Web/CSS/Shorthand_properties /en-US/docs/Web/CSS/CSS_cascade/Shorthand_properties
Expand Down
50 changes: 25 additions & 25 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -75803,21 +75803,6 @@
"BijuGC"
]
},
"Web/CSS/CSSOM_view/Viewport_concepts": {
"modified": "2020-11-20T07:41:38.029Z",
"contributors": [
"in43sh",
"PerfectVirgo",
"Wryhder",
"mfuji09",
"bagaffey",
"sivabalan02",
"syntaxval",
"chrisdavidmills",
"estelle",
"ExE-Boss"
]
},
"Web/CSS/CSSOM_view": {
"modified": "2020-10-15T21:38:34.242Z",
"contributors": [
Expand All @@ -75833,6 +75818,21 @@
"modified": "2020-04-27T22:32:23.815Z",
"contributors": ["chrisn", "mfluehr", "JohannesCleve", "Sheppy"]
},
"Web/CSS/CSSOM_view/Viewport_concepts": {
"modified": "2020-11-20T07:41:38.029Z",
"contributors": [
"in43sh",
"PerfectVirgo",
"Wryhder",
"mfuji09",
"bagaffey",
"sivabalan02",
"syntaxval",
"chrisdavidmills",
"estelle",
"ExE-Boss"
]
},
"Web/CSS/CSS_Flexible_Box_Layout/Controlling_ratios_of_flex_items_along_main_axis": {
"modified": "2020-06-24T00:31:19.661Z",
"contributors": [
Expand Down Expand Up @@ -76081,6 +76081,16 @@
"mfluehr"
]
},
"Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds": {
"modified": "2020-04-27T22:34:13.651Z",
"contributors": [
"codejockie",
"mfluehr",
"C.Bertolini",
"kscarfone",
"Sheppy"
]
},
"Web/CSS/CSS_backgrounds_and_borders/Using_multiple_backgrounds": {
"modified": "2020-06-24T00:30:00.545Z",
"contributors": ["tmhrtwg", "jonjohnjohnson", "mfluehr"]
Expand Down Expand Up @@ -78634,16 +78644,6 @@
"teoli"
]
},
"Web/CSS/Scaling_of_SVG_backgrounds": {
"modified": "2020-04-27T22:34:13.651Z",
"contributors": [
"codejockie",
"mfluehr",
"C.Bertolini",
"kscarfone",
"Sheppy"
]
},
"Web/CSS/Selector_list": {
"modified": "2020-10-15T22:23:36.353Z",
"contributors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ The required parts of a URL depend to a great extent on the context in which the

When a URL is used within a document, such as in an HTML page, things are a bit different. Because the browser already has the document's own URL, it can use this information to fill in the missing parts of any URL available inside that document. We can differentiate between an _absolute URL_ and a _relative URL_ by looking only at the _path_ part of the URL. If the path part of the URL starts with the `/` character, the browser will fetch that resource from the top root of the server, without reference to the context given by the current document.

Let's look at some examples to make this clearer. Let's assume that the URLs are defined from within the document located at the following URL: `https://developer.mozilla.org/en-US/docs/Learn`.
Let's look at some examples to make this clearer. Let's assume that the URLs are defined from within the document located at the following URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development`.

`https://developer.mozilla.org/en-US/docs/Learn` itself is an absolute URL. It has all necessary parts needed to locate the resource it points to.
`https://developer.mozilla.org/en-US/docs/Learn_web_development` itself is an absolute URL. It has all necessary parts needed to locate the resource it points to.

All of the following URLs are relative URLs:

- Scheme-relative URL: `//developer.mozilla.org/en-US/docs/Learn` — only the protocol is missing. The browser will use the same protocol as the one used to load the document hosting that URL.
- Domain-relative URL: `/en-US/docs/Learn` — the protocol and the domain name are both missing. The browser will use the same protocol and the same domain name as the one used to load the document hosting that URL.
- Sub-resources: `Common_questions/Web_mechanics/What_is_a_URL` — the protocol and domain name are missing, and the path doesn't begin with `/`. The browser will attempt to find the document in a subdirectory of the one containing the current resource. In this case, we really want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL`.
- Scheme-relative URL: `//developer.mozilla.org/en-US/docs/Learn_web_development` — only the protocol is missing. The browser will use the same protocol as the one used to load the document hosting that URL.
- Domain-relative URL: `/en-US/docs/Learn_web_development` — the protocol and the domain name are both missing. The browser will use the same protocol and the same domain name as the one used to load the document hosting that URL.
- Sub-resources: `Howto/Web_mechanics/What_is_a_URL` — the protocol and domain name are missing, and the path doesn't begin with `/`. The browser will attempt to find the document in a subdirectory of the one containing the current resource. In this case, we really want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL`.
- Going back in the directory tree: `../CSS/display` — the protocol and domain name are missing, and the path begins with `..`. This is inherited from the UNIX file system world — to tell the browser we want to go up by one level. Here we want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/../Web/CSS/display`, which can be simplified to: `https://developer.mozilla.org/en-US/docs/Web/CSS/display`.
- Anchor-only: `#semantic_urls` - all parts are missing except the anchor. The browser will use the current document's URL and replace or add the anchor part to it. This is useful when you want to link to a specific part of the current document.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/8/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Firefox 8 was released on November 8, 2011. This article provides information bo
- Handling of {{ cssxref("background-size") }} has been revised to more closely match the specification.
- In the past, {{ cssxref("text-decoration") }} in quirks mode had line thickness and position adjusted on descendant text to match the descendant. Now standards mode and quirks mode rendering are more similar.
- Horizontal positioning for elements has been brought more in line with the specification in many cases. Documentation for this is forthcoming, but for now, see [Firefox bug 682780](https://bugzil.la/682780), comment 23 for details.
- [SVG images are now scaled properly](/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds) when used as background images.
- [SVG images are now scaled properly](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds) when used as background images.

### Network

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ An element is clickable if it has an `onclick` event handler defined. You can ma

## Interactive elements must be able to be activated using a keyboard

If the user can interact with an element using touch or a pointing device, then the element should also support interacting using the keyboard. That is, if you have defined event handlers for touch or click events, you should also define them for keyboard events. The keyboard event handlers should enable the effectively the same interaction as the touch or click handlers.
If the user can interact with an element using touch or a pointing device, then the element should also support interacting using the keyboard. That is, if you have defined event handlers for touch or click events, you should also define them for keyboard events. The keyboard event handlers should enable effectively the same interaction as the touch or click handlers.

### See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ And to test:
ifHasChanged("your-page.html", function (modified, visit) {
console.log(
`The page '${this.filepath}' has been changed on ${new Date(
nModified,
modified,
).toLocaleString()}!`,
);
});
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/css/background-size/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ See [Resizing background images](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders
## See also

- [Resizing background images](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Resizing_background_images)
- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds)
- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds)
- {{cssxref("object-fit")}}
30 changes: 16 additions & 14 deletions files/en-us/web/css/css_backgrounds_and_borders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,26 @@ Click "Play" in the example above to see or edit the code for the animation in t
- {{cssxref("box-shadow")}}

> [!NOTE]
> The CSS Backgrounds Module Level 4 introduces the `background-position-block`, `background-position-inline`, `background-repeat-block`, `background-repeat-inline`, `background-repeat-x`, `background-repeat-y`, and `background-tbd` properties. These have not yet been implemented.
> The CSS backgrounds module level 4 introduces the `background-position-block`, `background-position-inline`, `background-repeat-block`, `background-repeat-inline`, `background-repeat-x`, `background-repeat-y`, and `background-tbd` properties. These have not yet been implemented.

### Data types

- {{cssxref("line-style")}} enumerated type

## Guides

- [Learn CSS: background and borders](/en-US/docs/Learn_web_development/Core/Styling_basics/Backgrounds_and_borders)
- : Explains how to implement decorative images using CSS background images.
- [Using multiple backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Using_multiple_backgrounds)
- : Explains how to set one or more backgrounds on an element.
- : Setting one or more backgrounds on an element.
- [Resizing background images](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Resizing_background_images)
- : Describes how to change the size and repeating behavior of background images.
- [Learn CSS: the box model](/en-US/docs/Learn_web_development/Core/Styling_basics/Box_model)
- : Explains how borders, along with other box model properties, impact the CSS box model.
- : Changing the size and repeating behavior of background images.
- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds)
- : How SVG aspect ratio, SVG dimension values, and the CSS `background-size` property impact the scaling of SVG background images.
- [Using CSS gradients](/en-US/docs/Web/CSS/CSS_images/Using_CSS_gradients)
- : Explains how to create CSS gradient background images.
- : Creating CSS gradients and using them as background images.
- [Learn CSS: background and borders](/en-US/docs/Learn_web_development/Core/Styling_basics/Backgrounds_and_borders)
- : Learn how to implement decorative images using CSS background images.
- [Learn CSS: the box model](/en-US/docs/Learn_web_development/Core/Styling_basics/Box_model)
- : Learn how borders and other box model properties impact the CSS box model.

## Related concepts

Expand Down Expand Up @@ -189,9 +191,9 @@ Click "Play" in the example above to see or edit the code for the animation in t

## See also

- Interactive tools that let you visually create borders images, rounded corners, and box shadows:
- [Border-image generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-image_generator)
- [Border-radius generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator)
- [Box-shadow generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator)
- [Applying color to HTML elements using CSS](/en-US/docs/Web/CSS/CSS_colors/Applying_color), including for borders.
- The [`drop-shadow()`](/en-US/docs/Web/CSS/filter-function/drop-shadow) filter function that applies a drop shadow effect to the input image. The function is used by the {{cssxref("filter")}} and {{cssxref("backdrop-filter")}} properties.
- {{cssxref("filter")}}
- {{cssxref("backdrop-filter")}}
- [`drop-shadow()`](/en-US/docs/Web/CSS/filter-function/drop-shadow) filter function
- [Applying color to HTML elements using CSS](/en-US/docs/Web/CSS/CSS_colors/Applying_color)
- [Border-image generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-image_generator)
- [Border-radius generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator)
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ The `cover` value specifies that the background image should be sized so that it

- {{cssxref("background-size")}}
- {{cssxref("background")}}
- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds)
- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading