You need to sign in to do that
Don't have an account?
DeveloperSud
How to inherit css styles in child component from parent in LWC?
What are options available inherit css styles in child component from parent in LWC.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
>> https://developer.salesforce.com/docs/component-library/documentation/en/lwc/create_components_css
The above documentation shows an implementation where they have added css to parent and child components, can you try checking it once?
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
Please follow the below link:-
-https://salesforce.stackexchange.com/questions/293264/css-not-applying-to-child-lwc
-https://salesforce.stackexchange.com/questions/248180/how-can-we-expose-inherited-properties-from-a-super-component-s-class-in-a-light
Thanks & Regards
Suraj Tripathi
A parent component can style a child component, but it styles it as a single element. A parent can’t reach into a child. Let’s add a c-child selector to parent.css that defines a border around the child component.
Parent in h1 and child in red outline
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh