webcode-tk 1.0.6__tar.gz → 1.0.8__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.0.6 → webcode_tk-1.0.8}/PKG-INFO +1 -1
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/pyproject.toml +1 -1
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/__init__.py +1 -1
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/cascade_tools.py +1 -1
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/css_tools.py +8 -4
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/LICENSE.rst +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/README.rst +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/color_keywords.py +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/color_tools.py +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/font_tools.py +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/html_tools.py +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/sample_report.json +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/ux_tools.py +0 -0
- {webcode_tk-1.0.6 → webcode_tk-1.0.8}/webcode_tk/validator_tools.py +0 -0
|
@@ -1677,7 +1677,7 @@ def get_color_contrast_details(tree: CSSAppliedTree, rating="AAA") -> list:
|
|
|
1677
1677
|
results = adjusted
|
|
1678
1678
|
else:
|
|
1679
1679
|
# It's a success! Let's let them know
|
|
1680
|
-
msg = f"
|
|
1680
|
+
msg = f"pass: {filename} passes color contrast for {rating} Normal"
|
|
1681
1681
|
msg += " and Large."
|
|
1682
1682
|
results.append(msg)
|
|
1683
1683
|
return results
|
|
@@ -1260,9 +1260,10 @@ def get_declaration_value_by_property(
|
|
|
1260
1260
|
def get_families(declaration_block: DeclarationBlock) -> list:
|
|
1261
1261
|
"""returns a list of all font families in a declaration block"""
|
|
1262
1262
|
families = []
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1263
|
+
if declaration_block:
|
|
1264
|
+
for ruleset in declaration_block.declarations:
|
|
1265
|
+
if ruleset.property in ("font", "font-family"):
|
|
1266
|
+
families.append(ruleset.value)
|
|
1266
1267
|
return families
|
|
1267
1268
|
|
|
1268
1269
|
|
|
@@ -1279,7 +1280,10 @@ def get_font_families(sheet: Stylesheet) -> list:
|
|
|
1279
1280
|
"""
|
|
1280
1281
|
font_families = []
|
|
1281
1282
|
for ruleset in sheet.rulesets:
|
|
1282
|
-
|
|
1283
|
+
try:
|
|
1284
|
+
block = ruleset.declaration_block
|
|
1285
|
+
except AttributeError:
|
|
1286
|
+
continue
|
|
1283
1287
|
families = get_families(block)
|
|
1284
1288
|
if families:
|
|
1285
1289
|
# create dict of selector and family
|
|
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
|