javascript - How to get HTML code compatibility for old / modern browsers -
i using material icons font, angularjs, cordova android/ios app.
problem is, android 4.x versions, have use "old" way display icon, (code documentation) :
<!-- modern browsers. --> <i class="material-icons">arrow_back</i> <!-- ie9 or below. --> <i class="material-icons"></i>
so now, think have find every icons in project, , update icon text hexa one, before have questions :
questions :
- is safe (or bad practice) only use old way (

) display icons, modern browsers ? compatibility dropped in few years modern browsers ? - is there way (in angularjs, pure js or html, if possible) detect if browser dosen't support modern way, , then, replace icon text hexa (
arrow_back
->
)
when use hexadecimal solution, works, pain when read html, have found other solution : generate icons via classname.
it works great, created repository if had same problem : material-icons-css
Comments
Post a Comment