Ionic-framework: bug: Ionic CSS attributes are deprecated

Created on 5 Oct 2019  路  6Comments  路  Source: ionic-team/ionic-framework

Upgrading to 4.10.0 I am getting the following CSS error:

fesm5.js:5006 [DEPRECATED][CSS] Ionic CSS attributes are deprecated.
Replace:
'<div text-wrap>'

With:
'<div class="ion-text-wrap">'

Looking at the documents I also noticed there is no longer text-wrap attribute but instead it is class="ion-text-wrap".

My question when was this breaking changed introduced and why isn't it stated in the changelog releases as a breaking change? It's actually not trivial but a major rework for my project.

triage

Most helpful comment

Thanks for the issue. The deprecation warnings are not breaking changes. CSS Attributes currently work in Ionic v4 and will continue to work until the next major release of Ionic. Any breaking changes are done in major release versions (4.0, 5.0, etc).

All 6 comments

same here.

I have the same issue! I don't understand why this is not in the changelog as a breaking change.

They are just deprecated and still work right? The breaking change will probably be introduced in the version they change from deprecated to removing the attribute selectors all-together. Masking it deprecated in previous versions gives you time to migrate the code. Maybe somebody already wrote a search/replace script that could be run to change all the attributes to css classes?

Yeah I can confirm they still work. If you have an existing class in the tag doing a simple replace won't help, hopefully some has created a better script, if there is one please let me know

Thanks for the issue. The deprecation warnings are not breaking changes. CSS Attributes currently work in Ionic v4 and will continue to work until the next major release of Ionic. Any breaking changes are done in major release versions (4.0, 5.0, etc).

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vswarte picture vswarte  路  3Comments

alexbainbridge picture alexbainbridge  路  3Comments

masimplo picture masimplo  路  3Comments

MrBokeh picture MrBokeh  路  3Comments

alan-agius4 picture alan-agius4  路  3Comments