# SOLVED: Default :where(.brxe-image) img rule missing when block is used as Component

**URL:** <https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236>\
**Category:** Bugs\
**Tags:** v2-3-5\
**Created:** [May 21, 2026, 9:14am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236 "2026-05-21T09:14:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 21, 2026, 9:14am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/1 "2026-05-21T09:14:25Z")

</div>

**Browser** : Chrome 110  
**OS** : macOS / Windows / Linux / etc.

When a block containing an Image element is inserted as a Component, the default Bricks rule:

`:where(.brxe-image) img { height: 100%; width: 100%; … }`

is not generated into the page’s dynamic CSS. As a result, falls back to height: auto, and object-fit: cover has no effect — images used as positioned/cover backgrounds overflow their container.

**Steps to reproduce:**

1. Build a Section with a Container (position: relative) and a Bricks Image element inside (position: absolute; inset: 0; object-fit: cover).
2. Save as Component.
3. Insert the Component on another page → image overflows.
4. Same block used directly (not as Component) → works correctly.

Verification (browser console on the affected page):

`javascript[…document.styleSheets].some(s => { try { return […s.cssRules].some(r => r.selectorText?.includes(‘:where(.brxe-image)’)); } catch { return false; } })`

Returns false on Component-based pages, true on direct-use pages.

**Workaround:** add .brxe-image img { width: 100%; height: 100%; } to global CSS.

---

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 21, 2026, 12:21pm UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/2 "2026-05-21T12:21:04Z")

</div>

**Update:** This is not limited to Image elements. The same issue occurs with Text Link elements — the default `:where(.brxe-text-link) { display: flex }` rule (or similar) is also missing when the element is used inside a Component, causing icon/text layout to break (icon position, gap, alignment all lost). This appears to be a general issue with Bricks default element CSS not being generated for Component-based content.

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 21, 2026, 12:30pm UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/3 "2026-05-21T12:30:53Z")

</div>

Hi Daniel,  
Thanks so much for your report!

However, I can’t reproduce the issue when I follow the steps you mentioned.  
Could you please record a screencast showing all the necessary steps and provide a link where we can see the problem? Feel free to use [try.bricksbuilder.io](http://try.bricksbuilder.io) if you don’t have a suitable live site.

Best regards,  
timmse

---

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 21, 2026, 1:09pm UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/4 "2026-05-21T13:09:54Z")

</div>

Hi @timmse ,

Thank you for your reply.

**Important update:** This issue only manifests on installations using Automatic.css (or any framework that sets img { height: auto; max-width: 100% } globally). On a clean Bricks-only install (e.g. [try.bricksbuilder.io](http://try.bricksbuilder.io)), the bug does not reproduce because there is no competing rule overriding the image height.

However, the underlying behavior is still concerning: the Bricks default :where(.brxe-image) img rule is missing in the dynamic CSS on Component-based pages, even though it is present on pages where the same block is used directly. This default rule normally provides height: 100%; width: 100% as a safety net, and its absence in Component contexts breaks layouts whenever any other CSS (framework, theme, or custom) overrides the img defaults.

The same is true for the :where(.brxe-text-link) default — its absence causes display: flex, gap, and align-items to be lost on text links inside Components.  
Steps to reproduce on a Bricks + ACSS install:

1. Build a block with an Image element positioned absolutely as a background, save as Component.
2. Insert on a different page.
3. Image overflows because height: 100% from Bricks defaults is missing, and ACSS height: auto takes over.

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 22, 2026, 6:05am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/5 "2026-05-22T06:05:03Z")

</div>

Hi Daniel,  
I’m sorry, but I still can’t reproduce the issue, so I’d like to ask again for a screencast showing all your steps and the problem, as well as to export your component.

---

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 22, 2026, 7:28am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/6 "2026-05-22T07:28:30Z")

</div>

Hi @timmse ,

I’ve made a screencast. I’m trying to demonstrate that if I don’t add the custom CSS code under Custom CSS, the image with absolute positioning doesn’t align to its relative parent — it fills the entire screen. Also, the icon order in the Text Link element isn’t correct either without the custom CSS code.

If I export the component, how can I send it to you?

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 22, 2026, 8:28am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/7 "2026-05-22T08:28:33Z")

</div>

I’m still confused… I still don’t quite understand what this is all about, or how I can reproduce it as the video doesn’t contain replication steps 😃

Edit: what if you just set the relative wrapper to overflow: hidden? Otherwise it’s kind of expected that the absolute image overflows… 🤔

> [@danielvigh](#):
>
> If I export the component, how can I send it to you?

You can just paste the json code here, or put the exported file in dropbox, gdrive or similar.

---

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 22, 2026, 12:58pm UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/8 "2026-05-22T12:58:39Z")

</div>

Hi,

**Problem 1 — Image element used as absolute-positioned background**

Build a block where an Image element is positioned with `position: absolute; inset: 0; object-fit: cover` to act as a background.

- **Used directly on a page:** image fills the parent container correctly.

- **Saved as Component and inserted on another page:** image overflows and renders at its intrinsic aspect ratio.

**Cause:** the Bricks default rule `:where(.brxe-image) img { height: 100%; width: 100% }` is not present in the dynamic CSS on Component-based pages. ACSS’s `img { height: auto; max-width: 100% }` then takes effect, the image gets its natural height, and `object-fit: cover` has nothing to “cover” against.

**Fix that resolved it:**

```auto
.brxe-image img { width: 100%; height: 100%; }

```

* * *

**Problem 2 — Text Link element with icon**

A Text Link element configured with an icon on the right side and a gap between icon and text.

- **Used directly:** icon renders on the right, with proper gap and vertical alignment.

- **Saved as Component and inserted on another page:** icon renders on the left, with no gap, no vertical centering.

**Cause:** the link’s computed `display` is `block` instead of `flex` on the Component-based page. The `flex-direction: row-reverse`, `gap`, and `align-items` properties are still set, but they have no effect because the element is not a flex container. The Bricks default rule that establishes `display: flex` on `.brxe-text-link` is missing from the dynamic CSS.

**Fix that resolved it:**

```auto
.brxe-text-link { display: inline-flex; align-items: center; }

```

**Here is the Component JSON file:** [bricks-component-dujkrq-for...](https://share.zight.com/o0udwkpQ)

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 26, 2026, 7:27am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/9 "2026-05-26T07:27:09Z")

</div>

Thanks for the component, but I still can’t replicate the issue, with or without ACSS:

 ![CleanShot 2026-05-26 at 09.25.01@2x](https://forum.bricksbuilder.io/uploads/default/original/3X/e/4/e45ba557d399db12fd1d66ddf728ba556fdfee76.jpeg)

Please send temporary login credentials and a link to this thread to [help@bricksbuilder.io](mailto:help@bricksbuilder.io) using the email address you used during the purchase.

---

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 26, 2026, 10:31am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/10 "2026-05-26T10:31:57Z")

</div>

Hi @timmse,

I’ve created the user and sent the credentials to the requested email address.

Thank you!

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 27, 2026, 5:51am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/11 "2026-05-27T05:51:40Z")

</div>

Thanks so much for the login credentials! After some back and forth, I found the necessary settings/setup to replicate it:

- External Styles
- A page template with a post content element » source WordPress
- And a Gutenberg page containing the component
- ACSS doesn’t make any difference, as far as I can see

It’s simply because certain default styles are missing from `frontend-light-layer.min.css` or `bricks-dynamic-data-inline-css`.

We’ll update this thread once it’s fixed.

---

<div class="post-metadata">

**Author:** ![danielvigh](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/danielvigh/32/25814_2.png) [@danielvigh](https://forum.bricksbuilder.io/u/danielvigh)\
**Post date:** [May 27, 2026, 9:09am UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/12 "2026-05-27T09:09:53Z")

</div>

Thanks so much for looking into this and finding the cause! Looking forward to the fix.  
Best regards,  
Daniel

---

<div class="post-metadata">

**Author:** ![bricks.assistant](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/bricks.assistant/32/32537_2.png) [@bricks.assistant](https://forum.bricksbuilder.io/u/bricks.assistant)\
**Post date:** [November 17, 2026, 12:50pm UTC](https://forum.bricksbuilder.io/t/solved-default-where-brxe-image-img-rule-missing-when-block-is-used-as-component/39236/13 "2026-11-17T12:50:11Z")

</div>

We’ve addressed this in Bricks 2.5-beta (beta release), now available for manual download from your Bricks account.

Components inserted as Gutenberg blocks and rendered through a WordPress-sourced Post Content element now keep the default Bricks element styles when External Styles are enabled.

Please read the [changelog entry](https://bricksbuilder.io/release/bricks-2-5-beta/) before testing, and let us know if you experience any issues. Beta builds are not intended for production sites.
