SOLVED: [class*="brxe-"] max-width 100% is too intrusive

No. When YOU set the styles, it goes by what you set. So if you add a heading element or a paragraph element and want to change the max-width to 30ch, you go to the element and add the max-width, and it works fine. If you prefer to use a code-snippets plugin, you can use the method Thomas noted earlier; it’s a more specific rule so it overrides the defaults.

This was in reply to Kevin’s question above me, not the OP.

Edited for clarity: you could also create your own class in the builder or out that sets the max-width. You have options. The OP is referring to his options with the framework targeting. It’s different than you as the individual using Bricks Builder styling, classes, or a code snippets plugin; you have complete control.

Forcing max-width to 100% is a pain. +1 for a fix/improvement here!

5 Likes

This is a bug! How can it be marked “No Bug”. If a standard CSS framework like ACSS has no practical way of overriding this attribute selector, then it’s a bug in my opinion. It’s not like this selector was always there - it was recently introduced. So clearly it’s not 100% needed for Bricks to work, even if it is useful in many cases.

Regardless, setting [class*=“brxe-”] { max-width: 100%; } for everyone with no way of turning it off is causing a lot of headaches, especially the for the biggest fans of Bricks Builder (ACSS users).

6 Likes

Exactly. Of all the hills to choose to die on, why is the Bricksbuilder team choosing this one?

2 Likes

:where seems to have added in the typography files for a selector for headings in the builder.

1.8.3

1.8.4

It is also used in various other places throughout Bricks source code for selectors so also unsure why it would not be added to the [class*="brxe-"] as stated in the OP thread and solve this issue.

We are at 92.45% as of 25/07/23

3 Likes

adding my +1 for this solution to the issue.

@digitalgravy @thomas

Correct me if I’m wrong, but isn’t body{max-width: 100%} achieving the exact same thing as
[class*="brxe-"]{max-width: 100%}?

As far as I know, this would limit anything inside <body> to grow past 100% of screen width.

@jonte98 No, it is not the same.

body{max-width:100%} just applies to the tag alone. Anything inside the body does not inherit this.

[class*="brxe-"]{max-width: 100%} applies to every element which has a class beginning with “brxe-” which is pretty much every element bricks adds to the DOM.

This makes every single element have a max-width of 100% which is where the OP bug stems from.

Using :where() selector solves this but it seems the Bricks team are unwilling to implement or talk further about it. No real response outside of @thomas original “NO BUG” and add this a “feature request” comment.

@dan I noticed that shortly after I posted haha…

I guess it wont be solved then…

Edit: I just checked bricksbuilder.io and its obviously built with Bricks, but it doesnt even have the [class*="brxe-"]{max-width: 100%}… it seems like there is a special version of Bricks :wink:

It’s an older version of Bricks where all elements had wrappers.

1 Like

@aslotta Any official word here on not updating the max width class to use the “where” class?

:where([class*="brxe-"]) {
  max-width: 100%;
}

It’s been shown that Bricks uses “where” in other cases, so I am not sure what the problem is.

It’s a quick and very easy fix that makes both sides of the argument happy.

Is this issue getting lost because it is tagged as not a bug? Should I add it to the feature request forum?

2 Likes

:where() has been removed from the heading selector in v1.9 as it was bug reported in this thread font sizes in the builder → WIP: Since v1.8.4, user defined font size in Typography > All Headings is overwritten by Bricks base defaults so it seems that this is a revert to the pre 1.8.4 way.

@thomas @timmse @aslotta @charaf would any of you guys be able to update us on this thread and why there has been no further conversation about the use of :where or @layers for Bricks default styles.

4 Likes

Please reconsider addressing this issue again to improve the usability and flexibility of Bricks. We do need this fixed; This shouldn’t be a problem we are facing in an awesome builder like bricks anyway.

1 Like

It’s been almost a year since this was initially discussed and sadly there isn’t a solution, yet. Is this still under consideration? It would be great if you can give some love to this issue! :blush:

I thinks it’s dead and they are not going to change it.

If it’s not in 2.0 then it won’t ever happen as that’s the most logical update to add it due to possible breaking changes.

1 Like

I am watching this thread since I have already bumped into this several times now.

Just ran into this also with line-lengths, don’t get why Bricks can’t implement a solution to keep everyone happy.

Also waiting for this.

At this point, I think we should all submit this as a feature request.

It won’t get the upvotes for visibility. Need more back to top buttons and section dividers first!!

If the devs wanted to do something about it they would have done by now or at least voiced they are looking into it. Once it gets assigned NO BUG it gets ignored.

I have accepted that I will to work around it and it will just be “one of those things”

Perhaps @Matej might be able to ping everyone again for a review.