Skip to content

Commit

Permalink
Add link for Applies to in propdef tables. Fixes speced#1992
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Sep 30, 2021
1 parent 082cf46 commit dfd51c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bikeshed/datablocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,10 @@ def transformPropdef(
th = f"<th><a href='https://www.w3.org/TR/css-cascade/#computed'>{key}:</a>"
elif key in ("Animatable", "Animation type"):
th = f"<th><a href='https://www.w3.org/TR/web-animations/#animation-type'>{key}:</a>"
elif key == "Applies to" and val.lower() == "all elements":
td = "<td><a href='https://www.w3.org/TR/css-pseudo/#generated-content' title='Includes ::before and ::after pseudo-elements.'>all elements</a>"
elif key == "Applies to":
th = f"<th><a href='https://www.w3.org/TR/css-cascade/#applies-to'>{key}:</a>"
if val.lower() == "all elements":
td = "<td><a href='https://www.w3.org/TR/css-pseudo/#generated-content' title='Includes ::before and ::after pseudo-elements.'>all elements</a>"
ret.append(tr + th + td)
ret.append("</table>")

Expand Down

0 comments on commit dfd51c3

Please sign in to comment.