Coloring tags with Stylus - content dependent
Hi,
following Frank's life logging post I have created a few habit trackers of my own.
In Stylus css, is there a way to format an element depending on it's content? I'd like to color tags in Workflowy like this:
#m0 = green #m1 = blue ...
So I need to get the number dynamically, otherwise I'd need to write 100+ styles. What I have:
[title="Filter #m3"] { background-color: #85d500 !important; color: #0000 !important; }
The reason for this is, I'd like to color code my home energy consumption in order to compare if this month's value is above or below average.
Please sign in to leave a comment.
Comments
0 comments