Closed indraraj26 closed 4 years ago
Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. This is due to Angular's component scoping, not Ionic Framework. To work around this you have 2 options:
Disable encapsulation on your component:
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
styleUrls: ['./home.page.scss'],
encapsulation: ViewEncapsulation.None
})
Move these styles to global.scss
to avoid Angular automatically scoping them.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[ ] 4.x [x] 5.x
Current behavior:
if you place below css in global.scss then it will work for ion-input and ion-textarea but not for searchbar home.component.html
home.component.scss
Expected behavior:
It should apply component scoped css on placeholder
Steps to reproduce:
Related code:
Repo : https://github.com/indraraj26/ionic5-starter-tabs-sidemenu/tree/placeholder-test Branch: placeholder-test
Other information:
Ionic info: