How to use CSS on Github
JSX is the language we use in React. This is NOT HTML, albeit it is similar, but they are rules to respect when it comes to CSS:
-
To link a class to a tag, use the following synthax:
<tag className={css.theClassYouWantToUse}>
-
NEVER use inline styling
<tag style="text-width: 33px">NO! WRONG!</tag>
-
Use camelCase to capitalise classname
<tag classname={css.big-title}>ERROR! YOU SHOULD USE "bigTitle"</tag>
-
To add several classes:
`<tag className={[css.className1, css.className2, css.className3]}>
-
If really needed, here's the format for inline styling (not recommanded)
<tag style={background-image: "url('iejafiofea')"}>