question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avatar component's 'color' attribute can't work

See original GitHub issue

Description

<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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jbadancommented, Aug 21, 2020

@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:

  1. Contribute! We’re open source and are happy to have new contributors. Check out our Developer Guide for getting started. The fundamental-react team is happy to review pull requests and provide assistance where necessary.
  2. Open a new issue with your feature request. There’s no timeline promises for when someone from the team would add this feature, but it would at least be on our radar.

I’m going to close this issue, feel free to reopen or create a new feature request issue.

0reactions
Vita-Meowcommented, Aug 21, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found