As of last month, there is near-full support for text-security: disc
(only FF mobile lacks behind as of this edit). I recommend considering Ol Sen's answer below first.
I found myself trying to imitate a password input, but overlaying another div with discs (•
) wasn't an option for me, since I needed it to work without JavaScript. I would have used text-security: disc
, but there isn't enough support for that at the moment.
So what I've done is create a font on FontStruct in which all Latin characters (including the ones with diacritics) look like a disc.
Here is a link to the file on my Dropbox.
Just like regular fonts, you can use it like so:
@font-face {
font-family: 'password';
src: url('../font/password.woff2') format('woff2'),
url('../font/password.woff') format('woff'),
url('../font/password.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
[contentEditable].password {
font-family: 'password';
}
P.S. If the Dropbox link is down and you happen to have it downloaded, feel free to replace the link. Otherwise just give this answer a comment