weasyprint 65.1__py3-none-any.whl → 67.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- weasyprint/__init__.py +17 -7
- weasyprint/__main__.py +21 -10
- weasyprint/anchors.py +4 -4
- weasyprint/css/__init__.py +732 -67
- weasyprint/css/computed_values.py +65 -170
- weasyprint/css/counters.py +1 -1
- weasyprint/css/functions.py +206 -0
- weasyprint/css/html5_ua.css +3 -7
- weasyprint/css/html5_ua_form.css +2 -2
- weasyprint/css/media_queries.py +3 -1
- weasyprint/css/properties.py +6 -2
- weasyprint/css/{utils.py → tokens.py} +306 -397
- weasyprint/css/units.py +91 -0
- weasyprint/css/validation/__init__.py +1 -1
- weasyprint/css/validation/descriptors.py +47 -19
- weasyprint/css/validation/expanders.py +7 -8
- weasyprint/css/validation/properties.py +341 -357
- weasyprint/document.py +20 -19
- weasyprint/draw/__init__.py +56 -63
- weasyprint/draw/border.py +121 -69
- weasyprint/draw/color.py +1 -1
- weasyprint/draw/text.py +60 -41
- weasyprint/formatting_structure/boxes.py +24 -5
- weasyprint/formatting_structure/build.py +33 -45
- weasyprint/images.py +76 -62
- weasyprint/layout/__init__.py +32 -26
- weasyprint/layout/absolute.py +7 -6
- weasyprint/layout/background.py +7 -7
- weasyprint/layout/block.py +195 -152
- weasyprint/layout/column.py +19 -24
- weasyprint/layout/flex.py +54 -26
- weasyprint/layout/float.py +12 -7
- weasyprint/layout/grid.py +284 -90
- weasyprint/layout/inline.py +121 -68
- weasyprint/layout/page.py +45 -12
- weasyprint/layout/percent.py +14 -10
- weasyprint/layout/preferred.py +105 -63
- weasyprint/layout/replaced.py +9 -6
- weasyprint/layout/table.py +16 -9
- weasyprint/pdf/__init__.py +58 -18
- weasyprint/pdf/anchors.py +3 -4
- weasyprint/pdf/fonts.py +126 -69
- weasyprint/pdf/metadata.py +36 -4
- weasyprint/pdf/pdfa.py +19 -3
- weasyprint/pdf/pdfua.py +7 -115
- weasyprint/pdf/pdfx.py +83 -0
- weasyprint/pdf/stream.py +57 -49
- weasyprint/pdf/tags.py +307 -0
- weasyprint/stacking.py +14 -15
- weasyprint/svg/__init__.py +59 -32
- weasyprint/svg/bounding_box.py +4 -2
- weasyprint/svg/defs.py +4 -9
- weasyprint/svg/images.py +11 -3
- weasyprint/svg/text.py +11 -2
- weasyprint/svg/utils.py +15 -8
- weasyprint/text/constants.py +1 -1
- weasyprint/text/ffi.py +4 -3
- weasyprint/text/fonts.py +13 -5
- weasyprint/text/line_break.py +146 -43
- weasyprint/urls.py +41 -13
- {weasyprint-65.1.dist-info → weasyprint-67.0.dist-info}/METADATA +5 -6
- weasyprint-67.0.dist-info/RECORD +77 -0
- weasyprint/draw/stack.py +0 -13
- weasyprint-65.1.dist-info/RECORD +0 -74
- {weasyprint-65.1.dist-info → weasyprint-67.0.dist-info}/WHEEL +0 -0
- {weasyprint-65.1.dist-info → weasyprint-67.0.dist-info}/entry_points.txt +0 -0
- {weasyprint-65.1.dist-info → weasyprint-67.0.dist-info}/licenses/LICENSE +0 -0
weasyprint/css/properties.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import collections
|
|
4
4
|
from math import inf
|
|
5
5
|
|
|
6
|
-
from tinycss2.
|
|
6
|
+
from tinycss2.color5 import parse_color
|
|
7
7
|
|
|
8
8
|
Dimension = collections.namedtuple('Dimension', ['value', 'unit'])
|
|
9
9
|
|
|
@@ -42,7 +42,7 @@ INITIAL_VALUES = {
|
|
|
42
42
|
# Backgrounds and Borders 3 (CR): https://www.w3.org/TR/css-backgrounds-3/
|
|
43
43
|
'background_attachment': ('scroll',),
|
|
44
44
|
'background_clip': ('border-box',),
|
|
45
|
-
'background_color':
|
|
45
|
+
'background_color': 'transparent',
|
|
46
46
|
'background_image': (('none', None),),
|
|
47
47
|
'background_origin': ('padding-box',),
|
|
48
48
|
'background_position': (('left', Dimension(0, '%'),
|
|
@@ -89,6 +89,8 @@ INITIAL_VALUES = {
|
|
|
89
89
|
'mask_border_repeat': ('stretch', 'stretch'),
|
|
90
90
|
'mask_border_mode': 'alpha',
|
|
91
91
|
|
|
92
|
+
# Color Adjustment 1 (CRD): https://www.w3.org/TR/css-color-adjust-1
|
|
93
|
+
'color_scheme': 'normal',
|
|
92
94
|
|
|
93
95
|
# Color 3 (REC): https://www.w3.org/TR/css-color-3/
|
|
94
96
|
'opacity': 1,
|
|
@@ -273,6 +275,7 @@ INHERITED = {
|
|
|
273
275
|
'border_spacing',
|
|
274
276
|
'caption_side',
|
|
275
277
|
'color',
|
|
278
|
+
'color_scheme',
|
|
276
279
|
'direction',
|
|
277
280
|
'empty_cells',
|
|
278
281
|
'font_family',
|
|
@@ -371,4 +374,5 @@ INITIAL_NOT_COMPUTED = {
|
|
|
371
374
|
'border_left_color',
|
|
372
375
|
'border_bottom_color',
|
|
373
376
|
'border_right_color',
|
|
377
|
+
'background_color',
|
|
374
378
|
}
|