Cosmetic rules in pihole

Hello,

how can I insert a cosmetic rule in Pihole?
The content would be for example:
“d3ward.github.io##.textads” and
“d3ward.github.io##.adbox.banner_ads.adsbox”.

Thanks

You can't.

Pi-hole is not a browser extension. It is a DNS sinkhole.

Pi-hole only sees the domain part (d3ward.github.io).
The following parts are CSS selectors, only visible in the browser.