# Style in react

**URL:** https://forum.kirupa.com/t/style-in-react/638407
**Category:** Uncategorized
**Created:** [June 25, 2018, 11:02am UTC](https://forum.kirupa.com/t/style-in-react/638407 "2018-06-25T11:02:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![moonbury](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/moonbury/32/9178_2.png) [@moonbury](https://forum.kirupa.com/u/moonbury)
#### Post date: [June 25, 2018, 11:02am UTC](https://forum.kirupa.com/t/style-in-react/638407/1 "2018-06-25T11:02:28Z")

</div>

Regarding to styling in react chapter, I know that we can put the style in a separate CSS file, in this case, how can we assign CSS style to the letterStyle variable?

---

<div class="post-metadata">

### Author: ![JohnHansenArtist](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnhansenartist/32/8958_2.png) [@JohnHansenArtist](https://forum.kirupa.com/u/JohnHansenArtist)
#### Post date: [June 25, 2018, 12:51pm UTC](https://forum.kirupa.com/t/style-in-react/638407/2 "2018-06-25T12:51:25Z")

</div>

There are a number of ways to style using CSS in React. Depending which one you work with will determine how and where you write and access your CSS variables, and whether they will be locally or globally scoped to your app’s or component’s CSS. The most basic is to import a index.css file that contains your global css variables. To make them global to the whole project you can use **:root** as your selector.
