Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Add support for @footnote area in @page #64

Merged
merged 1 commit into from
May 2, 2021

Conversation

schmidti159
Copy link
Contributor

Hi,
we use ph-css as part of a product that uses CSS for generating print layouts. In this use case we also need to support footnotes as defined in this w3c working draft: https://www.w3.org/TR/css-gcpm-3/

However parsing CSS files that use this kind of structure, failed with ph-css:

@page {
  @footnote {
    float: bottom;
  }
}

In the grammar I added @footnote just like the other page margins even if it not a margin per se but a page area. From a CSS point of view however I think this is fine, as it does behave like a page margin.

I also added a test css file and a test, that the file is read correctly. Is test css file read by the general tests as well or is there another place to register this test file?

The other extensions from this working draft (::footnote-call and ::footnote-marker) should already work I assume. Do you see any problems with them?

@codecov
Copy link

codecov bot commented May 2, 2021

Codecov Report

Merging #64 (9bc8e29) into master (95b795e) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #64      +/-   ##
============================================
+ Coverage     68.72%   68.78%   +0.05%     
- Complexity     1572     1576       +4     
============================================
  Files           146      146              
  Lines          7112     7112              
  Branches        799      799              
============================================
+ Hits           4888     4892       +4     
+ Misses         1902     1898       -4     
  Partials        322      322              
Impacted Files Coverage Δ Complexity Δ
...src/main/java/com/helger/css/decl/CSSPageRule.java 75.36% <0.00%> (+2.89%) 26.00% <0.00%> (+2.00%)
...n/java/com/helger/css/decl/CSSPageMarginBlock.java 65.21% <0.00%> (+4.34%) 15.00% <0.00%> (+2.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95b795e...9bc8e29. Read the comment docs.

@phax
Copy link
Owner

phax commented May 2, 2021

Very cool - thank you :)

@phax phax merged commit 945d885 into phax:master May 2, 2021
@phax
Copy link
Owner

phax commented May 2, 2021

This is part of the 6.3.1 release that is just on the way to Maven Central 👍🏼

@schmidti159 schmidti159 deleted the support-@footnote branch May 3, 2021 06:05
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

Successfully merging this pull request may close these issues.

None yet

2 participants