1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00
WeasyPrint/weasyprint/layout
Guillaume Ayoub fc7db276e5 Add page declarations on demand
With the previous system, we were listing all page types as the cartesian
product of page names and pseudo selectors. Declarations were added for all
these possible page types.

The nth() page selector makes this system impossible, as we can't make the
cartesian product with a number of pages we don't know at the beginning of the
rendering. We now add declarations before rendering each page, based on the
properties of the page.

This new way is faster when the total number of pages is lower than the
cartesian product of possible pages. For long documents, we could improve speed
by detecting CSS rules based on page index or page name, and use cached results
for all pages that don't rely on such rules.
2019-04-02 12:39:00 +02:00
..
__init__.py Minor fixes 2019-04-02 11:35:23 +02:00
absolute.py Please isort again 2019-03-10 19:34:16 +01:00
backgrounds.py Please isort again 2019-03-10 19:34:16 +01:00
blocks.py Fix margin-break: auto 2019-03-27 11:30:52 +01:00
columns.py Please isort again 2019-03-10 19:34:16 +01:00
flex.py Don't crash when flex items are replaced boxes 2019-03-22 16:15:50 +01:00
float.py Please isort again 2019-03-10 19:34:16 +01:00
inlines.py Fix justified and underlined text 2019-04-01 14:25:13 +02:00
markers.py Please isort again 2019-03-10 19:34:16 +01:00
min_max.py Update copyright 2019-03-04 11:04:06 +01:00
pages.py Add page declarations on demand 2019-04-02 12:39:00 +02:00
percentages.py Clean and add tests 2019-03-14 17:01:38 +01:00
preferred.py Please isort again 2019-03-10 19:34:16 +01:00
replaced.py Update copyright 2019-03-04 11:04:06 +01:00
tables.py Break unbreakable table groups if we really need to 2019-03-22 16:41:10 +01:00