Fix for issue #58 - :before and :after cannot be used with :nth-child, :nth-of-type, etc

Thanks to lan-Y for the fix.