Skip to content

Instantly share code, notes, and snippets.

@vanjavk
Created January 12, 2021 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanjavk/47c70e64e1481c461a06c52096368490 to your computer and use it in GitHub Desktop.
Save vanjavk/47c70e64e1481c461a06c52096368490 to your computer and use it in GitHub Desktop.
Bug reproduction
from tinycss2 import *
stylecss=parse_stylesheet("""#a1{
fill: #000000;
}
#a2{
fill: #FFFFFF;
}""",skip_whitespace=True)
print(stylecss[0].content[4].value)
print(stylecss[1].content[4].value)
stylecss[0].content[4].value="FFFFFF"
stylecss[1].content[4].value="000000"
print(stylecss[0].content[4].value)
print(stylecss[1].content[4].value)
final=serialize(stylecss)
print(final)
### OUTPUT
# 000000
# FFFFFF
# FFFFFF
# 000000
# #a1{
# fill: #FFFFFF;
# }#a2{
# fill: #\30 00000;
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment