Skip to content
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

Resize Home core value icons #1

Open
michulee opened this issue Feb 21, 2021 · 1 comment
Open

Resize Home core value icons #1

michulee opened this issue Feb 21, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@michulee
Copy link
Contributor

michulee commented Feb 21, 2021

18d4957
use .svg-inline--fa to directly target icon

when using class={}, icon auto fills the container but can't resize with .core-icons class

@michulee michulee added the help wanted Extra attention is needed label Feb 21, 2021
@michulee michulee changed the title Resize Home core value icons Resize Home core value icons 18d49572f49d37db56ca3fe100274bfdfe64f83f Feb 21, 2021
@michulee michulee changed the title Resize Home core value icons 18d49572f49d37db56ca3fe100274bfdfe64f83f Resize Home core value icons Feb 21, 2021
@michulee michulee added bug Something isn't working question Further information is requested and removed help wanted Extra attention is needed labels Feb 21, 2021
@michulee
Copy link
Contributor Author

michulee commented Feb 21, 2021

This issue is for the core values section on index.js.

When using className, you are able to resize the icon.
<FontAwesomeIcon icon={faHandshake} className={clsx("core-icons")}/>

However, when using class, classes don't work and the icon fills its container. This seems to effect only <FontAwesomeIcon />.
<FontAwesomeIcon icon={faHandshake} class={clsx()}/>

Should we use className for everything, or should we use only className just for <FontAwesomeIcon />? I made notes in the documentation about class and className.

When it comes to React, you CAN use className instead of class ; there's no functional difference. The reason for this decision was because of the definition of a keyword. Because class is native to JavaScript, you use className for JSX. There doesn't seem to be any functional changes except that the keywords are named differently.

class is a keyword in JavaScript and JSX is an extension of JavaScript. A keyword means that a token has a special meaning in a language syntax.

It also seems that clsx is faster than classnames .

The developers of React were going to make classNameclass after many requests, but this issue was shelved due to "syntax limitations" (Aug 2020). For legacy purposes, it's best to use class because the team at React are serious about this issue.

Issue has been fixed. 8f230e3

@michulee michulee added documentation Improvements or additions to documentation and removed bug Something isn't working labels Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant