# Component specific sass file not picked up

**URL:** <https://forum.ionicframework.com/t/component-specific-sass-file-not-picked-up/139966>\
**Category:** Ionic Framework\
**Created:** [August 28, 2018, 8:30am UTC](https://forum.ionicframework.com/t/component-specific-sass-file-not-picked-up/139966 "2018-08-28T08:30:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HinderiksR](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@HinderiksR](https://forum.ionicframework.com/u/HinderiksR)\
**Post date:** [August 28, 2018, 8:30am UTC](https://forum.ionicframework.com/t/component-specific-sass-file-not-picked-up/139966/1 "2018-08-28T08:30:14Z")

</div>

Hi,

If got some weird issue with ionic 4. Every component is being generated with a scss file, However putting a custom class in there and applying that class on the html file it does not even seem to build or something.

Placing the same code in global.scss works fine.

Element specific scss files worked fine in ionic 3.

With best regards,  
Robin

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [September 1, 2018, 9:17am UTC](https://forum.ionicframework.com/t/component-specific-sass-file-not-picked-up/139966/2 "2018-09-01T09:17:53Z")

</div>

> [@HinderiksR](#):
>
> However putting a custom class in there and applying that class on the html file it does not even seem to build or something.

1. The scss or css has to be referenced in its component, like

2. Without specifying any specific ViewEncapsulation, per default, your css/scss should not contains anymore it’s component name

for example styling a div of the component `home.page.scss`

v3

```
 app-home {
    div {
      color: red;
    }
 }

```

v4

```
 div {
      color: red;
    }

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:22pm UTC](https://forum.ionicframework.com/t/component-specific-sass-file-not-picked-up/139966/3 "2021-07-19T21:22:25Z")

</div>

Closed on July 19, 2021, 9:22pm UTC


