Change :before and :after > ::before and ::after

This should objectively be changed.

::before and ::after are correct and will also work best in browsers. Default for bricks is :before and :after. This should be changed. Since this does not work correctly and will not generate the before and after speudo elements in the debugger. It does generate them with the ::before and ::After. (tested in firefox)

The normal rule is:
Double-colon selectors are pseudo-elements.
Single-colon selectors are pseudo-selectors.

So it should use :: and not :

Hey Hendrik,

I agree that the double colon is correct for pseudo elements. Can you tell me which “default for bricks” selectors you are referring to as an example?

Best,

André

The shortcuts icons are from the Advanced Themer plugin. The developer told me “This is just a shortcut of the default pseudo from Bricks”. As you see, it’s :before and :after.
358536991_2785782918231344_3656615529639695646_n
You can also find these defaults in the pseudo selector from the native bricks list.
afbeelding

I think the default for these should be ::before and ::after not :before and :after.
And yes I know it technically says “States (pseudo-classes)” but I still think using the element version is the better option.

Hey Hendrik,

there are no default :before and :after pseudo elements in Bricks. That’s why I was asking. So in your case they were probably created by a plugin.

CleanShot 2023-07-10 at 11.39.43@2x

And checking the frontend CSS it’s ::before and ::after that is used.

Best,

André

When using :before or :after as pseudo class, it does not show up in my dev tools als selectable element. Using ::before and ::after does. This is why I was bringing up this issue. I only use litespeed cache, bricks and advanced themer. So If you say that bricks does not use :before and :after by default, I will have to ask the dev of AT again.

:before
359364640_2785798884896414_4205348547241970901_n
::before
358590860_2785798731563096_2470106609557565604_n