DEV Community

Discussion on: Do you use CSS ::before and ::after pseudo elements?

Collapse
 
ut4utc profile image
ut4utc

Only yesterday I asked a question on stackoverflow for WordPress - how to add to the price of a variable product, left the word Price, and then, not finding the answer, I took it and made it through ::before

div.summary-inner span.price .amount::before {
content: 'Цена: ';
}

Watch result you can at here parketdoska.ua/каталог/acacia/акац...

Collapse
 
brob profile image
Bryan Robinson

Great idea! I've used pseudo elements in similar situations. When I don't have control over the HTML (or as much control as I'd like), I know I can always insert some content with CSS.

Collapse
 
ut4utc profile image
ut4utc

In your article, a very interesting approach to gradient fills - I did not expect this, it looks great! Thank you!

I will need to use it somewhere in my new projects. I’ve almost finished going through a paid course about programming WordPress templates and I even had an idea, thanks Bryan to your article, how I can use this effect for my project that I want to create using my own programming template.