-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
CSS syntax module and error handling #31076
Conversation
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Preview URLs
External URLs (1)URL:
(comment last updated: 2023-12-19 14:25:39) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @estelle! Thanks for a great new set of content. I've included quite a lot of comments, but these are mainly just quibbles about individual grammar and prose points. There is a lot of dense detail in the error handling page, and a lot of my suggestions are centered around trying to make this great content as clear as possible.
|
||
The **CSS syntax** module describes, in general terms, the structure and syntax of cascading stylesheets, or CSS. It defines CSS as the language for describing the rendering of structured documents (such as HTML and XML), on the web and elsewhere. | ||
|
||
This module doesn't define any properties, {{cssxref("css_types", "data types")}}, {{cssxref("css_functions", "functions")}}, or {{cssxref("at-rule", "at-rules")}}. Rather, it elaborates on how all of these features should be defined and how user agents should parse CSS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The links in this paragraph are not code terms but are formatted as such. Maybe use regular links for these? I'm not sure if csssxref allows you to do the same trick as domxref, e.g. {{cssxref("css_types", "data types", "", "nocode")}}, if you want them to not be shown in code font.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. I did not know this trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, looks like the links got broken. As I feared, that trick doesn't work in cssxref, only domxref. I've fixed the links for you as a penance for wasting your time.
Co-authored-by: Chris Mills <[email protected]>
|
||
Custom properties are generally considered valid when declared, but may create invalid CSS when accessed, i.e. they may be used as a value (via the {{cssxref("var")}} function) for a property that does not accept that value type. The browser parses each custom property when encountered without regard to where the property is consumed. | ||
|
||
Generally, when a property value is invalid, the declaration is ignored and the property falls back to the last valid value. Invalid computed custom property values, however, work slightly differently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mdn-linter] reported by reviewdog 🐶
Generally, when a property value is invalid, the declaration is ignored and the property falls back to the last valid value. Invalid computed custom property values, however, work slightly differently. | |
Generally, when a property value is invalid, the declaration is ignored and the property falls back to the last valid value. Invalid computed custom property values, however, work slightly differently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisdavidmills Thanks for the feedback. I think i captured everything.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking awesome, nice work @estelle (Simmons). Let's get this merged.
* New page: CSS syntax error handling * deprecate @charset and list as a rule not at-rule * Define character encoding * New page: error handling * New page: css syntax module * delete charset module. move to syntax module * still supported * table of contents * better grammar * better grammar * better grammar * better grammar * Apply suggestions from code review Co-authored-by: Dipika Bhattacharya <[email protected]> * added a few more notes - prefixes * edits per review * change h2 to h3 * Apply suggestions from code review Co-authored-by: Dipika Bhattacharya <[email protected]> * add guide to module page. * change UA to browser * address mdn#30793 (comment) * hyphens to underscores * rewrote the at-rule section * rewrite grammar section * fixing linter suggestions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * final tweaks * Update files/en-us/web/css/css_syntax/error_handling/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/css_syntax/error_handling/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix flaws * closed comments * borked so fixed * trailing spaces Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/css_syntax/error_handling/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/css_syntax/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Small punctuation fixes * Apply suggestions from code review Co-authored-by: Chris Mills <[email protected]> * header for at-rule * updates based on review feedback * link to display property * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/css_syntax/error_handling/index.md * Update files/en-us/web/css/css_syntax/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix broken links * typo fix --------- Co-authored-by: Dipika Bhattacharya <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Mills <[email protected]>
The original task was to update the charset module. Turns out there is no such thing.
Charset was defined in CSS 2 but removed in the CSS syntax module.
This PR was previously reviewed and is now co-authored by @dipikabh. See #30793