bss icon indicating copy to clipboard operation
bss copied to clipboard

Debug mode makes bugs harder to find

Open tqc opened this issue 6 years ago • 1 comments

I just spent an afternoon tracking down an elusive bug to the following code

<span className={b.fw(600).c('rgba(0, 0, 0, 0.7').class}>{children}</span>

When rules are added with sheet.insertRule, the only effect is the invalid color rule not being applied.

When in debug mode (which was turned on in an unrelated part of the codebase), all subsequent rules are inside the unclosed color rule, which breaks everything except the component containing the bug.

tqc avatar Nov 14 '19 22:11 tqc

Hi @tqc . That's a very good point! Sorry to hear you've been bitten by that. I haven't been using debug mode myself much since I don't use dev tools, but this is definitely something that should be improved upon. I'll try to think of a good way to isolate each definition set or perhaps validate props & values.

porsager avatar Nov 24 '19 09:11 porsager