Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repeater background color issue #15

Open
yaron86 opened this issue Nov 20, 2023 · 3 comments
Open

repeater background color issue #15

yaron86 opened this issue Nov 20, 2023 · 3 comments

Comments

@yaron86
Copy link

yaron86 commented Nov 20, 2023

i made a repeater field like this:
https://prnt.sc/aqOxkU8FD9KV
https://prnt.sc/opD7GcZH0CyJ

then i made a listing repeater and inside it i used elementor button and set the background color of the btn like this:
https://prnt.sc/Ixp3g3e9acJc
https://prnt.sc/SazdysGYH6k2

the issue is when i set multiple buttons with different bg colors all of the btn's have the same background color (although i set different colors for each btn):
https://prnt.sc/fGZFvY3J9_Tl

@taropaa
Copy link

taropaa commented Dec 9, 2023

I have the same issue. It always only takes the value from the first instance of the repeater.

@taropaa
Copy link

taropaa commented Dec 9, 2023

I had a look at the code, and I can see that the colour is correctly expressed inside the data-dce-background-color attribute.
But when I look at the CSS styling the selector targeting the background color, is highlighting both instances of the repeater field. I believe this is because the color is part of CSS. I may be off here though 🤔

@taropaa
Copy link

taropaa commented Dec 9, 2023

Last Post here, I promise.
I was able to find a workaround.
The usage may be limited, but:
I used the attributes section in the advanced tab.
I clicked on dynamic data and selected the repeater field > typed in my custom field name that holds the color value.
Then, I set the before to: style|background-color: and after to !important. This inserts the colour as an important inline style, which at least works for my purposes. Hopefully @rtpHarry can find the cause and patch this.

Below is a screenshot of what I mean:
Screenshot 2023-12-08 at 9 16 24 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants