[WIP] Custom classes are too specific and firmly inline

When creating a custom class for an element an inline style block is added to the header of the page and .myclass.bricksclass{} selectors are used.

Reusing the custom class on another page creates an inline style block on that page too.

Ideally custom classes should be added to an external style sheet when that box is checked (they are not) and ideally the selector should be element agnostic, e.g. .myclass{} is enough.

Same but different:

As it stands extra page weight is created by the use of custom classes styled in the editor, and on every page that they are used.

29 Likes

Agree

+1

I hope this is fixed. An external sheet with naked classes is much more efficient and standard.

8 Likes

Agree as well +1

We may want to use these custom classes elsewhere on elements not controlled by Bricks.

3 Likes

You can. Bricks doesn’t stop you doing that.

.mycustomclass.brickselementclass{color:red;} 

/* is the same as  */

.mycustomclass .brickselementclass{color:red;}

Just extra, more specific targetting that probably isn’t needed.

1 Like

Yeah I know, it’s the extra targeting I don’t like though. (along with no external style sheet)

Plus there could be confusion since “brickselmentclass” is named for the type of element it is used on even if the custom class you created is designed to be use on different elements.

Thanks Tony => needs to be fixed, yes … fully agree!

1 Like

+1 please get rid of this behavior

1 Like

+1
Agree with this. Should get it fixed.

+1
Please fix that. Less is more!

+1. I am pretty sure team must had a reason to make it like this. May be some limitation in the past.

2 Likes

+1 fully agree!
that would make things a lot easier

1 Like

I completely agree with this.

1 Like

Agree, +1 for this fix, it needs to be fixed.

1 Like

+1
Agree with this. I hope this is fixed.

1 Like

+1 Agree with this.

…

1 Like

+1 Agree! The issue needs to be addressed.

1 Like

+1 I am with everyone.

+1 on the bus :bus: :bus: :bus: :bus:

Yes i agree. It would be great if this can be fixed.

+1 Must have - needs to be addressed