Skip to content

Commit ad9776a

Browse files
authored
chore(ia): Reorganize CSS pages - part 5 (moving at-rules and related files under reference/at-rules) (#41801)
* create at-rules directory and listing page * move css/css_syntax/at-rule_functions to css/reference/at-rules * resolve merge conflicts * update sidebar and page types * add descriptors to at-rules index listing * update at-rules guide slug to add an 's' * add at-rules guide to the sidebar
1 parent be8baea commit ad9776a

File tree

310 files changed

+3816
-3589
lines changed

Some content is hidden

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

310 files changed

+3816
-3589
lines changed

files/en-us/_redirects.txt

Lines changed: 191 additions & 93 deletions
Large diffs are not rendered by default.

files/en-us/_wikihistory.json

Lines changed: 2847 additions & 2847 deletions
Large diffs are not rendered by default.

files/en-us/glossary/composite_operation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ page-type: glossary-definition
55
sidebar: glossarysidebar
66
---
77

8-
In CSS, the value of a property in a CSS rule is the _underlying value_ of that property, and the value of that same property in a [keyframe](/en-US/docs/Web/CSS/@keyframes) is its _effect value_.
8+
In CSS, the value of a property in a CSS rule is the _underlying value_ of that property, and the value of that same property in a [keyframe](/en-US/docs/Web/CSS/Reference/At-rules/@keyframes) is its _effect value_.
99

1010
**Composite operation** is the specific operation that is used to combine an effect value with an underlying value to produce the final keyframe effect value. There are three types of composite operations:
1111

files/en-us/glossary/css_descriptor/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ page-type: glossary-definition
55
sidebar: glossarysidebar
66
---
77

8-
A **CSS descriptor** defines the characteristics of an [at-rule](/en-US/docs/Web/CSS/CSS_syntax/At-rule). At-rules may have one or multiple descriptors. Each descriptor has:
8+
A **CSS descriptor** defines the characteristics of an [at-rule](/en-US/docs/Web/CSS/CSS_syntax/At-rules). At-rules may have one or multiple descriptors. Each descriptor has:
99

1010
- A name
1111
- A value, which holds the component values

files/en-us/glossary/gamut/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Traditionally, in web development, the only gamut used was _[sRGB](https://en.wi
1313

1414
Since 2021, browsers have started to provide functionality for other gamuts, like _[Display-P3](/en-US/docs/Glossary/Color_space#display-p3)_, widely used in the movie industry, and _[rec2020](/en-US/docs/Glossary/Color_space#rec2020)_.
1515

16-
Developers can define different sets of colors for devices supporting larger gamuts using the [`color-gamut`](/en-US/docs/Web/CSS/@media/color-gamut) [media feature](/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries). They can describe colors outside the RGB gamut using specific CSS functions like [`lch()`](/en-US/docs/Web/CSS/color_value/lch) for the LCH cylindrical coordinate system, or [`lab()`](/en-US/docs/Web/CSS/color_value/lab) for the Lab coordinate system.
16+
Developers can define different sets of colors for devices supporting larger gamuts using the [`color-gamut`](/en-US/docs/Web/CSS/Reference/At-rules/@media/color-gamut) [media feature](/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries). They can describe colors outside the RGB gamut using specific CSS functions like [`lch()`](/en-US/docs/Web/CSS/color_value/lch) for the LCH cylindrical coordinate system, or [`lab()`](/en-US/docs/Web/CSS/color_value/lab) for the Lab coordinate system.
1717

1818
## See also
1919

files/en-us/glossary/media/css/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ CSS offers several features that allow you to tweak your document's styles—or
1515

1616
- [Using media queries](/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries)
1717
- [Media queries](/en-US/docs/Web/CSS/CSS_media_queries)
18-
- {{cssxref("@media")}} [at-rule](/en-US/docs/Web/CSS/CSS_syntax/At-rule): Conditionally apply part of a CSS stylesheet, based on the result of a media query.
18+
- {{cssxref("@media")}} [at-rule](/en-US/docs/Web/CSS/CSS_syntax/At-rules): Conditionally apply part of a CSS stylesheet, based on the result of a media query.
1919
- {{domxref("Window.matchMedia()")}}: Test the viewing device against a media query

files/en-us/learn_web_development/core/css_layout/responsive_design/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ Next, we will study media queries in more detail and show how to use them to sol
495495

496496
- Working with touchscreen devices:
497497
- [Touch events](/en-US/docs/Web/API/Touch_events) provide the ability to interpret finger (or stylus) activity on touch screens or trackpads, enabling quality support for complex touch-based user interfaces.
498-
- Use the [pointer](/en-US/docs/Web/CSS/@media/pointer) or [any-pointer](/en-US/docs/Web/CSS/@media/any-pointer) media queries to load different CSS on touch-enabled devices.
498+
- Use the [pointer](/en-US/docs/Web/CSS/Reference/At-rules/@media/pointer) or [any-pointer](/en-US/docs/Web/CSS/Reference/At-rules/@media/any-pointer) media queries to load different CSS on touch-enabled devices.
499499
- [CSS-Tricks guide to media queries](https://css-tricks.com/a-complete-guide-to-css-media-queries/)
500500
- [The Frontend Developer Career Path](https://scrimba.com/the-frontend-developer-career-path-c0j?via=mdn) <sup>[_MDN learning partner_](/en-US/docs/MDN/Writing_guidelines/Learning_content#partner_links_and_embeds)</sup> from Scrimba teaches all you need to know to be a competent front-end web developer, with fun interactive lessons and challenges, knowledgeable teachers, and a supportive community. Go from zero to landing your first front-end job! Many of the course components are available as standalone free versions. This includes a module on responsive design.
501501

files/en-us/learn_web_development/core/css_layout/supporting_older_browsers/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Now that you have worked through our articles on CSS layout, it's time to test y
156156

157157
## See also
158158

159-
- [`@supports`](/en-US/docs/Web/CSS/@supports) at-rule
160-
- [CSS at-rules](/en-US/docs/Web/CSS/CSS_syntax/At-rule)
159+
- [`@supports`](/en-US/docs/Web/CSS/Reference/At-rules/@supports) at-rule
160+
- [CSS at-rules](/en-US/docs/Web/CSS/CSS_syntax/At-rules)
161161
- [Using feature queries](/en-US/docs/Web/CSS/CSS_conditional_rules/Using_feature_queries)
162162
- [CSS conditional rules](/en-US/docs/Web/CSS/CSS_conditional_rules) module

files/en-us/learn_web_development/core/frameworks_libraries/ember_getting_started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Installing shared assets, as we're about to do, isn't normally a required step f
162162

163163
3. Next, find the [ember-cli-build.js](https://github.com/ember-cli/ember-cli/blob/master/packages/app-blueprint/files/ember-cli-build.js) file inside the todomvc directory (it's right there inside the root) and open it in your chosen code editor. ember-cli-build.js is responsible for configuring details about how your project is built — including bundling all your files together, asset minification, and creating sourcemaps — with reasonable defaults, so you don't typically need to worry about this file.
164164

165-
We will however add lines to the ember-cli-build.js file to import our shared CSS files, so that they become part of our build without having to explicitly [`@import`](/en-US/docs/Web/CSS/@import) them into the `app.css` file (this would require URL rewrites at build time and therefore be less efficient and more complicated to set up).
165+
We will however add lines to the ember-cli-build.js file to import our shared CSS files, so that they become part of our build without having to explicitly [`@import`](/en-US/docs/Web/CSS/Reference/At-rules/@import) them into the `app.css` file (this would require URL rewrites at build time and therefore be less efficient and more complicated to set up).
166166

167167
4. In `ember-cli-build.js`, find the following code:
168168

files/en-us/learn_web_development/core/styling_basics/cascade_layers/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ page-type: learn-module-chapter
55
sidebar: learnsidebar
66
---
77

8-
This lesson aims to introduce you to [cascade layers](/en-US/docs/Web/CSS/@layer), a more advanced feature that builds on the fundamental concepts of the [CSS cascade](/en-US/docs/Web/CSS/CSS_cascade/Cascade) and [CSS specificity](/en-US/docs/Web/CSS/CSS_cascade/Specificity).
8+
This lesson aims to introduce you to [cascade layers](/en-US/docs/Web/CSS/Reference/At-rules/@layer), a more advanced feature that builds on the fundamental concepts of the [CSS cascade](/en-US/docs/Web/CSS/CSS_cascade/Cascade) and [CSS specificity](/en-US/docs/Web/CSS/CSS_cascade/Specificity).
99

1010
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.
1111

@@ -45,7 +45,7 @@ The 'C' in CSS stands for "Cascading". It is the method by which styles cascade
4545
3. **Origin:** Within each of the two importance buckets, sort rules by author, user, or user-agent origin.
4646
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.
4747
5. **Specificity:** For competing styles in the origin layer with precedence, sort declarations by [specificity](/en-US/docs/Web/CSS/CSS_cascade/Specificity).
48-
6. **Scoping proximity**: When two selectors in the origin layer with precedence have the same specificity, the property value within scoped rules with the smallest number of hops up the DOM hierarchy to the scope root wins. See [How `@scope` conflicts are resolved](/en-US/docs/Web/CSS/@scope#how_scope_conflicts_are_resolved) for more details and an example.
48+
6. **Scoping proximity**: When two selectors in the origin layer with precedence have the same specificity, the property value within scoped rules with the smallest number of hops up the DOM hierarchy to the scope root wins. See [How `@scope` conflicts are resolved](/en-US/docs/Web/CSS/Reference/At-rules/@scope#how_scope_conflicts_are_resolved) for more details and an example.
4949
7. **Order of appearance:** When two selectors in the origin layer with precedence have the same specificity and scope proximity, the property value from the last declared selector with the highest specificity wins.
5050

5151
For each step, only the declarations "still in the running" move on to "compete" in the next step. If only one declaration is in the running, it "wins", and the subsequent steps are moot.
@@ -99,7 +99,7 @@ We now understand "cascade origin precedence", but what is "cascade layer preced
9999

100100
Similar to how we have six levels of priority based on origin and importance, cascade layers enable us to create sub-origin level of priority within any of those origins.
101101

102-
Within each of the six origin buckets, there can be multiple cascade layers. The [order of layer creation](/en-US/docs/Web/CSS/@layer) matters a lot. It is the order of creation that sets the precedence order among layers within an origin.
102+
Within each of the six origin buckets, there can be multiple cascade layers. The [order of layer creation](/en-US/docs/Web/CSS/Reference/At-rules/@layer) matters a lot. It is the order of creation that sets the precedence order among layers within an origin.
103103

104104
In normal origin buckets, layers are sorted in the order of each layer's creation. The order of precedence is from the first layer created to the last, followed by unlayered normal styles.
105105

@@ -125,7 +125,7 @@ Layer precedence always beats selector specificity. Styles in layers with preced
125125

126126
Cascade layers allow the creation of nested layers. Each cascade layer can contain nested layers.
127127

128-
For example, a component library may be imported into a `components` layer. A regular cascade layer will add the component library to the author origin, removing any specificity conflicts with other author styles. Within the `components` layer, a developer can choose to define various themes, each as a separate nested layer. The order of these nested theme layers can be defined based on media queries (see the [Layer creation and media queries](#layer_creation_and_media_queries) section below), such as viewport size or [orientation](/en-US/docs/Web/CSS/@media/orientation). These nested layers provide a way to create themes that don't conflict based on specificity.
128+
For example, a component library may be imported into a `components` layer. A regular cascade layer will add the component library to the author origin, removing any specificity conflicts with other author styles. Within the `components` layer, a developer can choose to define various themes, each as a separate nested layer. The order of these nested theme layers can be defined based on media queries (see the [Layer creation and media queries](#layer_creation_and_media_queries) section below), such as viewport size or [orientation](/en-US/docs/Web/CSS/Reference/At-rules/@media/orientation). These nested layers provide a way to create themes that don't conflict based on specificity.
129129

130130
The ability to nest layers is very useful for anybody who works on developing component libraries, frameworks, third-party widgets, and themes.
131131

@@ -139,9 +139,9 @@ The ability to create nested layers also removes the worry of having conflicting
139139

140140
Layers can be created using any one of the following methods:
141141

142-
- The [`@layer`](/en-US/docs/Web/CSS/@layer) statement at-rule, declaring layers using `@layer` followed by the names of one or more layers. This creates named layers without assigning any styles to them.
142+
- The [`@layer`](/en-US/docs/Web/CSS/Reference/At-rules/@layer) statement at-rule, declaring layers using `@layer` followed by the names of one or more layers. This creates named layers without assigning any styles to them.
143143
- The `@layer` block at-rule, in which all styles within a block are added to a named or unnamed layer.
144-
- The [`@import`](/en-US/docs/Web/CSS/@import) rule with the `layer` keyword or `layer()` function, which assigns the contents of the imported file into that layer.
144+
- The [`@import`](/en-US/docs/Web/CSS/Reference/At-rules/@import) rule with the `layer` keyword or `layer()` function, which assigns the contents of the imported file into that layer.
145145

146146
All three methods create a layer if a layer with that name has not already been initialized. If no layer name is provided in the `@layer` at-rule or `@import` with `layer()`, a new anonymous (unnamed) layer is created.
147147

@@ -154,7 +154,7 @@ Let's cover the three ways of creating a layer in a little more detail before di
154154

155155
The order of layers is set by the order in which the layers appear in your CSS. Declaring layers using `@layer` followed by the names of one or more layers without assigning any styles is one way to define the [layer order](#determining_the_precedence_based_on_the_order_of_layers).
156156

157-
The [`@layer`](/en-US/docs/Web/CSS/@layer) CSS at-rule is used to declare a cascade layer and to define the order of precedence when there are multiple cascade layers. The following at-rule declares three layers, in the order listed:
157+
The [`@layer`](/en-US/docs/Web/CSS/Reference/At-rules/@layer) CSS at-rule is used to declare a cascade layer and to define the order of precedence when there are multiple cascade layers. The following at-rule declares three layers, in the order listed:
158158

159159
```css
160160
@layer theme, layout, utilities;
@@ -294,9 +294,9 @@ In wide screens, the `site` layer is declared in the first line, meaning `site`
294294

295295
### Importing style sheets into named and anonymous layers with @import
296296

297-
The [`@import`](/en-US/docs/Web/CSS/@import) rule allows users to import style rules from other style sheets either directly into a CSS file or into a {{htmlelement('style')}} element.
297+
The [`@import`](/en-US/docs/Web/CSS/Reference/At-rules/@import) rule allows users to import style rules from other style sheets either directly into a CSS file or into a {{htmlelement('style')}} element.
298298

299-
When importing stylesheets, the `@import` statement must be defined before any CSS styles within the stylesheet or `<style>` block. The `@import` statement must come first, before any styles, but can be preceded by an `@layer` at-rule that creates one or more layers without assigning any styles to the layers. (`@import` can also be preceded by an [`@charset`](/en-US/docs/Web/CSS/@charset) rule.)
299+
When importing stylesheets, the `@import` statement must be defined before any CSS styles within the stylesheet or `<style>` block. The `@import` statement must come first, before any styles, but can be preceded by an `@layer` at-rule that creates one or more layers without assigning any styles to the layers. (`@import` can also be preceded by an [`@charset`](/en-US/docs/Web/CSS/Reference/At-rules/@charset) rule.)
300300

301301
You can import a stylesheet into a named layer, a nested named layer, or an anonymous layer. The following layer imports the style sheets into a `components` layer, a nested `dialog` layer within the `components` layer, and an un-named layer, respectively:
302302

0 commit comments

Comments
 (0)