Avatar component's 'color' attribute can't work
See original GitHub issueDescription
<Avatar color={1} circle glyph='search' size='xs' />
The color attibute can’t work as expected, the background color is still blue.
Versions
fundamental-react: “fundamental-react”: “^0.11.0”,
NOTE: Where applicable, please include uncropped screen captures.
DISCLAIMER: After triaging an issue, the fundamental-react team will see if it can be reproduced or confirmed. If more information is needed, the fundamental-react team will contact the author. Any issues awaiting responses from the author for more than 7 days will be closed. The author can re-open the issue at a later time if they can present the requested information.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Support colors in Avatar component · Issue #409 - GitHub
Avatar component has color property, but it doesn't work. Any color that is passed doesn't change anything.
Read more >Avatar background color not changing dynamically in material ...
I'm trying to change each avatar background color on the basis of categories, for example if the category is "work" then the avatar...
Read more >Configuring the Avatar - Unity - Manual
So, whether the automatic Avatar creation fails or succeeds, you need to go into the Configure Avatar mode to ensure your Avatar is...
Read more >How to adjust appearance attributes in Illustrator
Learn about working with and managing appearance attributes in Adobe Illustrator.
Read more >ngx-avatar - npm
A universal avatar component for Angular applications that fetches / generates avatar based on the information you have about the user.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Luciferzhangyi @liucaizhong @Vita-Meow
[class*=fd-avatar]
should most likely be removed. That is an issue for fundamental styles - I will start a conversation there. If you’re going to continue importing both fundamental-react and fundamental-styles, you will keep encountering unexpected issue and we cannot provide support for this situation.You have 2 paths forward:
I’m going to close this issue, feel free to reopen or create a new feature request issue.
Hi, from my little point of view, I think the problem is the css styles defined in the generic selector (
[class*=fd-avatar]
)override the staff that written in the specific class (.fd-avatar--accent-color-1
) when we import the fundamental styles after fundamental react; But I was wondering whatever, something generic should never be able to override something specific; Can this[class*=fd-avatar]
can change to be.fd-avatar
, since each avartar should has the.fd-avatar
class?