Skip to content
Merged
Prev Previous commit
Next Next commit
Some more CSS value link replacements with cssxref
  • Loading branch information
dipikabh committed Dec 17, 2025
commit f93d7b2a82782491c853b92261b9eb4dd705eff2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This lesson aims to introduce you to [cascade layers](/en-US/docs/Web/CSS/Refere

If you are new to CSS, working through this lesson may seem less relevant immediately and a little more academic than some other parts of the course. However, knowing the basics of what cascade layers are should you encounter them in your projects is helpful. The more you work with CSS, understanding cascade layers and knowing how to leverage their power will save you from a lot of pain managing a code base with CSS from different parties, plugins, and development teams.

Cascade layers are most relevant when you're working with CSS from multiple sources when there are conflicting CSS selectors and competing specificities, or when you're considering using [`!important`](/en-US/docs/Web/CSS/Reference/Values/important).
Cascade layers are most relevant when you're working with CSS from multiple sources when there are conflicting CSS selectors and competing specificities, or when you're considering using {{cssxref("important", "!important")}}.

<table>
<tbody>
Expand Down Expand Up @@ -41,7 +41,7 @@ To understand cascade layers, you must understand the CSS cascade well. The sect
The 'C' in CSS stands for "Cascading". It is the method by which styles cascade together. The user agent runs through several clearly defined steps to determine the values assigned to every property for every element. We will briefly list these steps here and then dig deeper into step 4, **Cascade layers**, which is what you came here to learn:

1. **Relevance:** Find all the declaration blocks with a selector match for each element.
2. **Importance:** Sort rules based on whether they are normal or important. Important styles are those that have the [`!important`](/en-US/docs/Web/CSS/Reference/Values/important) flag set.
2. **Importance:** Sort rules based on whether they are normal or important. Important styles are those that have the {{cssxref("important", "!important")}} flag set.
3. **Origin:** Within each of the two importance buckets, sort rules by author, user, or user-agent origin.
4. **Cascade layers:** Within each of the six origin importance buckets, sort by cascade layer. The layer order for normal declarations is from the first layer created to the last, followed by unlayered normal styles. This order is inverted for important styles, with unlayered important styles having the lowest precedence.
5. **Specificity:** For competing styles in the origin layer with precedence, sort declarations by [specificity](/en-US/docs/Web/CSS/Guides/Cascade/Specificity).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ If you restrict a box with a `width` or a `height`, CSS trusts you to know what

## The overflow property

The {{cssxref("overflow")}} property allows you to specify how the browser should handle overflowing content. The default value of the [`<overflow>`](/en-US/docs/Web/CSS/Reference/Values/overflow_value) value type is `visible`. With this default setting, one can see content when it overflows.
The {{cssxref("overflow")}} property allows you to specify how the browser should handle overflowing content. The default value of the {{cssxref("&lt;overflow&gt;")}} value type is `visible`. With this default setting, one can see content when it overflows.

### Hiding overflowing content

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ You'll learn about image values in more depth in our [Background and borders](/e

## Position

The [`<position>`](/en-US/docs/Web/CSS/Reference/Values/position_value) value type represents a set of 2D coordinates, used to position an item such as a background image (via {{cssxref("background-position")}}). It can take keywords such as `top`, `left`, `bottom`, `right`, and `center` to align items with specific bounds of a 2D box, and lengths, which represent offsets from the top and left-hand edges of the box.
The {{cssxref("&lt;position&gt;")}} value type represents a set of 2D coordinates, used to position an item such as a background image (via {{cssxref("background-position")}}). It can take keywords such as `top`, `left`, `bottom`, `right`, and `center` to align items with specific bounds of a 2D box, and lengths, which represent offsets from the top and left-hand edges of the box.

A typical position value consists of two values — the first sets the position horizontally, the second vertically. If you only specify values for one axis the other will default to `center`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ h1 {
}
```

This has changed with CSS 2; the keyword [initial](/en-US/docs/Web/CSS/Reference/Values/initial) is now a valid value for a CSS property. It resets it to its default value, which is defined in the CSS specification of the given property.
This has changed with CSS 2; the keyword {{cssxref("initial")}} is now a valid value for a CSS property. It resets it to its default value, which is defined in the CSS specification of the given property.

```css
/* Heading default color is black */
Expand Down