Search code examples
htmlioscsssafariios-ui-automation

How i can prevent safari on iOS to replace triangle with iOS UI?


I use triangles ◀ ▶ as button in my application.

<div>◀</div>
<div>▶</div>
<div>✔</div>

It works fine in all browsers, except on Safari for iOS, where the triangles are replaced by safari UI elements.

If you see the fiddles with a browser you can see normal triangles, but if you check with iOS Safari will appeare safari UI.

http://codepen.io/sassoli/pen/KNgyKe

I know, i can solve simply using border triangles or images, but I prefer a solution with css.

Edit

I find out that this char also is replaced with iOS UI.


Solution

  • I found out that these chars are not replaced by iOS

    Right-triangle: ► (&#x25ba)

    Left-triangle: ◄ (&#x25c4)

    or as alternative, is possible use psedoselector adding "\FE0E"

    HTML:

    <span class="left-pointing-triangle">&nbsp;</span>
    <span class="right-pointing-triangle">&nbsp;</span>
    

    CSS:

    .left-pointing-triangle::after {
       content: "\25C0 \FE0E";
    }
    
    .right-pointing-triangle::after {
       content: "\25B6 \FE0E";
    }