Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New css module: CSS syntax. Partially deprecated charset. #30793

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
df11dae
New page: CSS syntax error handling
estelle Dec 5, 2023
e9bffa8
deprecate @charset and list as a rule not at-rule
estelle Dec 5, 2023
d5f1733
Define character encoding
estelle Dec 5, 2023
bddc9a2
New page: error handling
estelle Dec 5, 2023
9ff78fc
New page: css syntax module
estelle Dec 5, 2023
1c099d5
delete charset module. move to syntax module
estelle Dec 5, 2023
df627d9
still supported
estelle Dec 5, 2023
9b2da17
table of contents
estelle Dec 6, 2023
bd5f752
better grammar
estelle Dec 6, 2023
10d57b2
better grammar
estelle Dec 6, 2023
2d832cf
better grammar
estelle Dec 6, 2023
3afcdbd
better grammar
estelle Dec 6, 2023
e1424fb
Apply suggestions from code review
estelle Dec 7, 2023
4691893
added a few more notes - prefixes
estelle Dec 7, 2023
245d126
edits per review
estelle Dec 7, 2023
24772a4
change h2 to h3
estelle Dec 9, 2023
4d5c582
Apply suggestions from code review
estelle Dec 13, 2023
71944f1
add guide to module page.
estelle Dec 13, 2023
e287842
change UA to browser
estelle Dec 13, 2023
50c42ce
address https://github.com/mdn/content/pull/30793#discussion_r1421245493
estelle Dec 13, 2023
1ea3167
hyphens to underscores
estelle Dec 13, 2023
e0f68c2
rewrote the at-rule section
estelle Dec 14, 2023
ab85e39
rewrite grammar section
estelle Dec 15, 2023
53a33f3
fixing linter suggestions
dipikabh Dec 15, 2023
debf7a9
final tweaks
estelle Dec 15, 2023
a1c3201
Update files/en-us/web/css/css_syntax/error_handling/index.md
estelle Dec 15, 2023
496af3c
Update files/en-us/web/css/css_syntax/error_handling/index.md
estelle Dec 15, 2023
9d13c82
fix flaws
estelle Dec 15, 2023
30db514
closed comments
estelle Dec 15, 2023
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
1 change: 1 addition & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11480,6 +11480,7 @@
/en-US/docs/Web/CSS/CSS_User_Interface /en-US/docs/Web/CSS/CSS_basic_user_interface
/en-US/docs/Web/CSS/CSS_Variables /en-US/docs/Web/CSS/CSS_cascading_variables
/en-US/docs/Web/CSS/CSS_Viewport /en-US/docs/Web/CSS
/en-US/docs/Web/CSS/CSS_charsets /en-US/docs/Web/CSS/CSS_syntax
/en-US/docs/Web/CSS/CSS_descriptor_definition /en-US/docs/Web/CSS
/en-US/docs/Web/CSS/CSS_flex-wrap /en-US/docs/Web/CSS/flex-wrap
/en-US/docs/Web/CSS/CSS_grid_layout/Layout_using_line-based_placement /en-US/docs/Web/CSS/CSS_grid_layout/Grid_layout_using_line-based_placement
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -77124,10 +77124,6 @@
"modified": "2020-07-07T12:03:44.891Z",
"contributors": ["wbamberg", "mfluehr"]
},
"Web/CSS/CSS_charsets": {
"modified": "2020-10-15T21:38:35.251Z",
"contributors": ["wbamberg", "fscholz", "mfluehr", "Sebastianz", "teoli"]
},
"Web/CSS/CSS_colors": {
"modified": "2020-12-02T11:04:05.642Z",
"contributors": ["peterbe", "wbamberg", "fscholz", "Sheppy", "mfluehr"]
Expand Down Expand Up @@ -78500,6 +78496,10 @@
"modified": "2020-04-27T22:31:21.929Z",
"contributors": ["ExE-Boss", "mfuji09", "rachelandrew"]
},
"Web/CSS/CSS_syntax": {
"modified": "2020-10-15T21:38:35.251Z",
"contributors": ["wbamberg", "fscholz", "mfluehr", "Sebastianz", "teoli"]
},
"Web/CSS/CSS_table": {
"modified": "2020-07-07T12:26:58.542Z",
"contributors": ["wbamberg", "fscholz", "mfluehr", "Sebastianz", "teoli"]
Expand Down
4 changes: 3 additions & 1 deletion files/en-us/web/css/@charset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ browser-compat: css.at-rules.charset

{{CSSRef}}

The **`@charset`** [CSS](/en-US/docs/Web/CSS) [at-rule](/en-US/docs/Web/CSS/At-rule) specifies the character encoding used in the style sheet. It must be the first element in the style sheet and not be preceded by any character; as it is not a [nested statement](/en-US/docs/Web/CSS/Syntax#nested_statements), it cannot be used inside [conditional group at-rules](/en-US/docs/Web/CSS/At-rule#conditional_group_rules). If several `@charset` at-rules are defined, only the first one is used, and it cannot be used inside a `style` attribute on an HTML element or inside the {{ HTMLElement("style") }} element where the character set of the HTML page is relevant.
The **`@charset`** [CSS](/en-US/docs/Web/CSS) rule specifies the character encoding used in the style sheet. Although the first character in `@charset` is the `@` symbol, it is not an [at-rule](/en-US/docs/Web/CSS/At-rule). The [CSS syntax](/en-US/docs/Web/CSS/CSS_syntax) module deprecates this rule, defining it as an unrecognized legacy rule to be dropped when a stylesheet is grammar-checked, but it is [fully supported in all browsers](#browser-compatibility).

The `@charset` rule must be the first element in the style sheet and not be preceded by any character; as it is not a [nested statement](/en-US/docs/Web/CSS/Syntax#nested_statements), it cannot be used inside [conditional group at-rules](/en-US/docs/Web/CSS/At-rule#conditional_group_rules). If several `@charset` at-rules are defined, only the first one is used, and it cannot be used inside a `style` attribute on an HTML element or inside the {{ HTMLElement("style") }} element where the character set of the HTML page is relevant.

```css
@charset "utf-8";
Expand Down
24 changes: 0 additions & 24 deletions files/en-us/web/css/css_charsets/index.md

This file was deleted.

Loading
Loading