Skip to content

Commit

Permalink
Fix broken naming in css.py comments
Browse files Browse the repository at this point in the history
I assume this was a find and replace for “prop” to “declaration” at some point.
  • Loading branch information
robinwhittleton authored and acabal committed Jul 14, 2024
1 parent 4ea1530 commit a394344
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions se/css.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,17 @@ def parse_rules(css: str):
"""
Apply a CSS stylesheet to an XHTML tree.
The application is naive and should not be expected to be browser-grade.
CSS declarationerties on specific elements can be returned using EasyXmlElement.get_css_declarationerty()
CSS properties on specific elements can be returned using EasyXmlElement.get_css_property()
For example,
for node in dom.xpath("//em")"
print(node.get_css_declarationerty("font-style"))
print(node.get_css_property("font-style"))
"""

rules = []

# Parse the stylesheet to break it into rules and their associated declarationerties
# Parse the stylesheet to break it into rules and their associated properties
for token in tinycss2.parse_stylesheet(css, skip_comments=True):
if token.type == "error":
raise se.InvalidCssException(token.message)
Expand Down

0 comments on commit a394344

Please sign in to comment.