webcode-tk 1.1.6__tar.gz → 1.1.7__tar.gz
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.
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/PKG-INFO +2 -2
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/pyproject.toml +1 -1
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/__init__.py +1 -1
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/cascade_tools.py +10 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/css_tools.py +14 -2
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/LICENSE.rst +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/README.rst +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/color_keywords.py +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/color_tools.py +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/font_tools.py +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/html_tools.py +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/sample_report.json +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/ux_tools.py +0 -0
- {webcode_tk-1.1.6 → webcode_tk-1.1.7}/webcode_tk/validator_tools.py +0 -0
|
@@ -315,6 +315,16 @@ class Element(object):
|
|
|
315
315
|
type: the type of color contrast.
|
|
316
316
|
"""
|
|
317
317
|
col = self.color.get("value")
|
|
318
|
+
if not col:
|
|
319
|
+
for i in range(len(self.ancestors) - 1, -1, -1):
|
|
320
|
+
anc = self.ancestors[i]
|
|
321
|
+
if len(anc) > 2:
|
|
322
|
+
color_details = anc[4]
|
|
323
|
+
col = color_details.split(":")[1]
|
|
324
|
+
col = col.strip()
|
|
325
|
+
col = col.split()[0]
|
|
326
|
+
if color.is_color_value(col):
|
|
327
|
+
break
|
|
318
328
|
bg = self.background_color.get("value")
|
|
319
329
|
if color.is_gradient(bg):
|
|
320
330
|
results = color.get_color_contrast_with_gradients(
|
|
@@ -280,10 +280,22 @@ class Stylesheet:
|
|
|
280
280
|
):
|
|
281
281
|
selector = ruleset.selector
|
|
282
282
|
for declaration in ruleset.declaration_block.declarations:
|
|
283
|
-
|
|
283
|
+
color_counts = (
|
|
284
284
|
"color" in declaration.property
|
|
285
285
|
or "background" in declaration.property
|
|
286
|
-
|
|
286
|
+
and declaration.property
|
|
287
|
+
not in [
|
|
288
|
+
"border-color",
|
|
289
|
+
"outline-color",
|
|
290
|
+
"text-declaration-color",
|
|
291
|
+
"text-emphasis-color",
|
|
292
|
+
"text-shadow",
|
|
293
|
+
"caret-color",
|
|
294
|
+
"column-rule-color",
|
|
295
|
+
"print-color-adjust",
|
|
296
|
+
]
|
|
297
|
+
)
|
|
298
|
+
if color_counts:
|
|
287
299
|
property = declaration.property
|
|
288
300
|
value = declaration.value
|
|
289
301
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|