{"record":{"id":"b63304a2bc3d9471","repo":"swc-project/swc","slug":"value-at-rule-is-deprecated","errorCode":null,"errorMessage":"@value at-rule is deprecated","messagePattern":"@value at-rule is deprecated","errorType":"validation","errorClass":"swc_css_parser::Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/at_rules/mod.rs","lineNumber":428,"sourceCode":"\n                None\n            }\n            \"scope\" => {\n                self.input.skip_ws();\n\n                let prelude = AtRulePrelude::ScopePrelude(self.parse()?);\n\n                self.input.skip_ws();\n\n                Some(prelude)\n            }\n\n            \"value\" => {\n                if self.config.css_modules {\n                    let span = self.input.cur_span();\n                    let _: ComponentValue = self.parse()?;\n\n                    self.errors.push(Error::new(span, ErrorKind::ValueAtRule));\n\n                    self.input.skip_ws();\n                }\n\n                return Err(Error::new(Default::default(), ErrorKind::Ignore));\n            }\n            _ => {\n                return Err(Error::new(Default::default(), ErrorKind::Ignore));\n            }\n        };\n\n        if !is!(self, EOF) {\n            let span = self.input.cur_span();\n\n            return Err(Error::new(\n                span,\n                ErrorKind::Unexpected(\"tokens in at-rule prelude\"),\n            ));","sourceCodeStart":410,"sourceCodeEnd":446,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/at_rules/mod.rs#L410-L446","documentation":"With css_modules enabled, the deprecated css-modules @value at-rule is still parsed but the parser pushes this deprecation error (ErrorKind::ValueAtRule) at the at-rule's span and then ignores the rule. It is a deprecation signal, not a hard parse failure.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/at_rules/mod.rs:428 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace @value with standard custom properties (var(--x))","Filter or downgrade the ValueAtRule error to a warning in your error handling","Disable css_modules if @value support is irrelevant"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}