-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
New color attribute is not working in header tag, .e.g <h1 color="primary"> when it is in some container, e.g Card #8330
Comments
This seems to happen everywhere. I have the same issue when applying |
In addition, I noticed that (in my case on ion-navbar) the color is being extracted including quotes. Resulting in wrong attributes.
In the other cases the css selector for the default colors is more specific and therefor taking priority. |
Thanks for the issue! We are currently looking into ways to improve this. @bglaz The issue with item divider will be resolved by this issue: #8376, when this PR is reviewed and merged: #9094 @NickStemerdink How are you adding those quotes? The issue there is that they are curly quotes, if you remove the curly quotes from your markup it will work fine:
I'd still like to know how you are getting those so we can look into it though. :) |
@brandyscarney, good catch, I didn't even notice that! I traced back the quotes to the 2.0.0-rc.0 upgrade guide: https://github.com/driftyco/ionic/releases/tag/v2.0.0-rc.0. |
@NickStemerdink Ah strange! I'm not sure how those got in there. I updated the release though to remove them. Thanks for letting me know! :) |
- Remove native HTML element styling inside of cards (headings, paragraph) - Move the default color for the HTML elements to the content - Generate colors for the card itself, the header, the content, and the title using the color input - Add e2e test for card colors References #8330
Submitted a PR to fix this: #9118 When it's merged I'll create a nightly release for you to try out and update the issue here. Thanks! |
* refactor(card): add color/mode classes to header, title, content - Remove native HTML element styling inside of cards (headings, paragraph) - Move the default color for the HTML elements to the content - Generate colors for the card itself, the header, the content, and the title using the color input - Add e2e test for card colors References #8330 * refactor(item): remove paragraph styles, update activated colors - Adds test for item colors - Removes the color from native paragraph elements allowing colors to be passed Closes #9081 * refactor(item): bring back paragraph color and override in the item loop * refactor(card): add back heading and paragraph colors and override in color loop
This should be fixed now, I released a nightly version of the framework
Thanks! |
Well, I still got the issue on an h2 element where the color is not applied (inside an ion-sliding item > ion-item) |
Found the answer here: http://stackoverflow.com/questions/43960214/color-attribute-not-working-in-heading-inside-ionic-content-tag Looks like the attribute "ion-text" is needed. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Hello,
I have used color attribute as follows.
It should display DEALS in primary color but it don't.
Its rendered html is
But it renders dark color.
When I inspect its css rules
As a workaround if I put DEAL label in
it is working as desired
Please help me to implement correctly.
The text was updated successfully, but these errors were encountered: