Styling tables not inside code blocks

I’m a bit confused on how to do style only tables that aren’t a part of code blocks. My attempts at using the not selector don’t appear to be working. I know it’s possible to do because Duckquill does it just fine, but I don’t see what’s special about the scss code Duckquill uses.

Edit: Managed to get it with :not(pre) :not(code) > table as the selector.