You need to sign in to do that
Don't have an account?
laurens.brand
What is wrong with this CSS
This is the component:
<aura:component implements='force:appHostable'>
<h1 class="headline">My Lightning Component</h1>
</aura:component>
This is the app:
<aura:application >
<h1>Hello Lightning App!</h1>
<c:MyLightningComponent />
</aura:application>
This is the CSS:
.THIS{
}
h1.THIS.headline {
font-size:24px;
}
To me it seems to be doing what is it supposed to be doing. Which is "The component must include an H1 tag with a CSS class named 'headline'. The 'headline' CSS class must set a font-size of 24px."
Yet it complains that "The component is not using the correct CSS for the 'headline' class".
Anyone an idea of what I am doing wrong.
Much appreciated in advance.
<aura:component implements='force:appHostable'>
<h1 class="headline">My Lightning Component</h1>
</aura:component>
This is the app:
<aura:application >
<h1>Hello Lightning App!</h1>
<c:MyLightningComponent />
</aura:application>
This is the CSS:
.THIS{
}
h1.THIS.headline {
font-size:24px;
}
To me it seems to be doing what is it supposed to be doing. Which is "The component must include an H1 tag with a CSS class named 'headline'. The 'headline' CSS class must set a font-size of 24px."
Yet it complains that "The component is not using the correct CSS for the 'headline' class".
Anyone an idea of what I am doing wrong.
Much appreciated in advance.
All Answers
Read more below on this
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_css.htm
or
if your still interested, for me the following worked