How to write custom components in Ionic 2/3 without losing prepared css?

半腔热情 提交于 2019-11-29 07:31:09

You have to realise Ionic is using SASS and targets multiple platforms. When you create your <deletableItem></deletableItem> you have should mimic what the ionic team did with ion-checkbox, and create you Sass files.

Check out the source folder here for <ion-checkbox>.

Define your own SASS for deleteableItem.

Furthermore, on the Ionic website you can find the various SASS component/platform variables.

I also gave a detailed related explanation, regarding Ionic CSS classes assignment that may help you too.

You can also use Chrome inspect to see class assignments for ion-checkbox in the Developer tool, and compare them to the list on the Ionic website.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!