You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to process some CSS for Paged Media. I am getting SyntaxError: Unknown at rules on several examples from the spec, e.g. this footnote example: https://www.w3.org/TR/css-gcpm-3/#example-efe978c0:
constcss=`@page { @footnote { float: bottom; }}span.footnote { float: footnote; }`;const{ code }=transform({filename: 'test.css',code: Buffer.from(css),minify: true,});// I have tried using `customAtRules` to no avail:const{ code }=transform({filename: 'test.css',customAtRules: {footnote: {body: 'rule-list',},},code: Buffer.from(css),minify: true,});
The error data is { type: 'AtRuleInvalid', value: 'footnote' }
The text was updated successfully, but these errors were encountered:
Stigjb
changed the title
AtRuleInvalid error with nested at rules
SyntaxError - AtRuleInvalid when using non-standard Page regions
Feb 21, 2024
We're using a PDF generator, Prince, that supports a wide range of Page regions. In addition to @top-left, @top-center, etc. - which are supported by Lightning CSS - there are some that can be found in standard documents, like @footnote, and also some custom ones like @prince-overlay.
Obviously, Lightning CSS cannot add custom regions like @prince-overlay to its enum of page regions, but it would be nice to allow the syntax and process these rules in a visitor.
I am trying to process some CSS for Paged Media. I am getting
SyntaxError: Unknown at rule
s on several examples from the spec, e.g. this footnote example: https://www.w3.org/TR/css-gcpm-3/#example-efe978c0:The error data is
{ type: 'AtRuleInvalid', value: 'footnote' }
The text was updated successfully, but these errors were encountered: