mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 08:27:22 +03:00
fc7db276e5
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. |
||
---|---|---|
.. | ||
__init__.py | ||
absolute.py | ||
backgrounds.py | ||
blocks.py | ||
columns.py | ||
flex.py | ||
float.py | ||
inlines.py | ||
markers.py | ||
min_max.py | ||
pages.py | ||
percentages.py | ||
preferred.py | ||
replaced.py | ||
tables.py |