Is it possible to assign a css class to a container? I need to modify styling via a different app and can’t figure out how to do add css classes to a regular replo component 🤔
p
Pylon
05/03/2024, 2:07 AM
Hi! This is Shahar from the Replo Team. We do have the option to add custom IDs to containers however we access them in a different manner. You can find the option in the containers' Config tab as Data Attributes. We have the data and key input values. For example, if: data -> `custom_color`
value - > ``bg` `
Then a CSS code could be,
`<style> `
` [data-custom_color="bg"]{`
` background-color: #FFF; padding: 25px; ``
` } `
`</style>`
l
Laila Zouaki
05/03/2024, 2:09 AM
Gotcha! I had seen the data attributes, was wondering if there was a simpler way to do it 🙌
To share more about what I’m trying to do, there’s a page not styled by Replo where I want to hide part of the footer, and was hoping to just do .footer-newsletter
{ display: none }
on that page
p
Pylon
05/03/2024, 2:10 AM
I understand. Then, you can simply use the Custom code/ HTML component and add this CSS code inside the <Style></style> tags. That should definitely work.
🙌 1
l
Laila Zouaki
05/03/2024, 2:19 AM
Oh sweet! That worked like a charm. Thanks for forcing me to understand how data attributes work with CSS @Shahar 😂 🙏 🫡