Community forum for knowledge and support

Updated 4 months ago

The Use of `color: inherit;` in the Relume Project Starter

At a glance

The community member is asking about the use of the color: inherit; code in the Relume project starter. They have found that they often need to remove this code in order to correctly style the text color for headings and inputs. Another community member responds that this code is used to override some style properties imposed by Webflow, and that the "cascading" way to style is to apply styles as high up in the element hierarchy as possible. They suggest creating custom classes or wrappers if more specific styling is needed. The original poster decides to remove the color: inherit; code since it is in preparation for the style guide builder export, where it may cause issues.

Hello guys! Can i ask what the use of this color: inherit; code is for inside the relume project starter? More often than not i have to remove it because i can't style text color correctly for headings/inputs etc. I'm just wondering if im using it wrong 😃

Attachment
Screenshot 2024-12-17 at 12.53.37 PM.png
M
M
2 comments

@U05275WGTNX its something we want to communicate better but essentially its overriding some style properties that Webflow is imposing. If you style with true cascading in mind this is generally not an issue but totally understand if its not intuitive.

The cascade way to style is to apply styles as high up in the layer of elements as possible. So 90% of the time this should work with no issues. In the cases where you need to be very specific, you should likely just create a custom class or wrapper depending on what the element is. Its a bit complicated. Removing the code is fine - won’t hurt anything. Its in preparation of style guide builder export where things might “break” but we’re not there yet anyway…hopefully I’m making sense. Hoping to put a video together on this soon!

Hi @U041X15Q6CE thanks for answering my question! If it's in preparation for the style guide builder export, then i'll remove it. Thanks again! 🙏

Add a reply
Sign up and join the conversation on Slack