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

'REx_css-tools.xsl' problem with 'font' shorthand #12

Closed
tgraham-antenna opened this issue May 30, 2022 · 2 comments
Closed

'REx_css-tools.xsl' problem with 'font' shorthand #12

tgraham-antenna opened this issue May 30, 2022 · 2 comments
Assignees

Comments

@tgraham-antenna
Copy link

REx_css-tools.xsl seems to be making assumptions about the sequence of tokens in a font property that aren't always correct.

See, e.g., https://github.com/web-platform-tests/wpt/blob/master/css/css-grid/grid-items/grid-items-inline-blocks-001.html

When processing failed, I added xsl:message to show the property and value attributes of declaration as it was processed. The output shows that REx_css-parser.xsl was getting the components of the font property wrong and also inventing a line-height declaration with a zero-length value:

[XSLT message] display
[XSLT message] grid
[XSLT message] color
[XSLT message] red
[XSLT message] font-style
[XSLT message] 100px
[XSLT message] font-weight
[XSLT message] 1
[XSLT message] font-size
[XSLT message] Ahem
[XSLT message] line-height
[XSLT message] 
<c:errors xmlns:c="http://www.w3.org/ns/xproc-step"><c:error code="err:XC0095" name="css-xsl" type="p:xslt" href="file:/E:/Projects/ant/mantis/10369/cssa/workspace/css.xpl" line="142" column="28" xmlns:p="http://www.w3.org/ns/xproc" xmlns:err="http://www.w3.org/ns/xproc-error"><message>Error '{http://www.w3.org/2005/xqt-errors}XTTE0570': An empty sequence is not allowed as the value of variable $result-seq. (file:/E:/Projects/ant/mantis/10369/cssa/workspace/css2xsl.xsl at -1/-1)</message></c:error></c:errors>
@gimsieke
Copy link
Contributor

gimsieke commented Jun 4, 2022

Please give it a try again. (Unfortunately, I didn’t mention this issue in the most recent commit message.)

For debugging purposes, you can specify debug=yes and debug-dir-uri=file:///some/dir/ as parameters to the pipeline. Then you see, for example, the REx output in $debug-dir-uri/css-expand/css.1.parse.xml.

@tgraham-antenna
Copy link
Author

Solved the problematic parsing of font: 25px/1 Ahem;, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants