![](https://www.bram.us/wordpress/wp-content/uploads/2021/04/css-devtools-shadow-dom-setting-1568x1123.png)
Identify and Extract Pseudo-Element Selectors from built-in HTML Elements using DevTools
![](https://www.bram.us/wordpress/wp-content/uploads/2021/04/css-devtools-shadow-dom-setting-1568x1123.png)
A rather geeky/technical weblog, est. 2001, by Bramus
Over at CSS { In Real Life }, author Michelle Barker has detailed a clever way to style pseudo-elements (such as ::before and ::after) through JavaScript. In Javascript we have a few ways of selecting elements, but we can’t directly target pseudo-elements. […] Luckily, CSS custom properties can help. 👉 If you set a custom …
Continue reading “Style Pseudo-elements with Javascript Using Custom Properties”
::before
and ::after
Pseudo-Elements