I'm experiencing a minor issue with fonts in my stylesheet.
This is my CSS:
body
{
...
font: normal 62.5% "Lucida Sans Unicode",sans-serif;
}
#wrapper_page
{
...
font-size: 1.2em;
}
input, select, textarea
{
...
font: bold 100% "Lucida Sans Unicode",sans-serif;
}
And this is the result:
I think there is an internal css setting, somewhere, on webkits that modify the shape of the password dots. How can I get rid of it and have the same style on every browser?
Thanks!
EDIT: I just found something curious: by default, webkit browsers apply this CSS to password fields:
input[type="password"]
{
-webkit-text-security: disc;
}
And that's what is replacing the classic middot. I tried setting it to circle or none, but I cannot get something similar to what is shown by other browsers.
EDIT: I FOUND A SOLUTION. If you are using "Lucida Sans Unicode" font for your website, that's the problem! The only font that emulate correctly the password field's big dots of other browsers is Verdana, mixed with a little bit of letter spacing. So, for both Opera and Webkit, use the following code to fix it:
.opera input[type="password"],
.webkit input[type="password"]
{
font: large Verdana,sans-serif;
letter-spacing: 1px;
}
I found I could improve the situation a little with CSS dedicated to Webkit (Safari, Chrome). However, I had to set a fixed width and height on the field because the font change will resize the field.
The best I can find is to set
input[type="password"] {font:small-caption;font-size:16px}
Demo: http://jsfiddle.net/x5CCf/
The problem is that (as of 2016), for the password field, Firefox and Internet Explorer use the character "Black Circle" (●), which uses the Unicode code point
25CF
, but Chrome uses the character "Bullet" (•), which uses the Unicode code point2022
.As you can see, even in the StackOverflow font the two characters have different sizes.
The font you're using, "Lucida Sans Unicode", has an even greater disparity between the sizes of these two characters, leading to you noticing the difference.
The simple solution is to use a font in which both characters have similar sizes.
The fix could thus be to use a default font of the browser, which should render the characters in the password field just fine:
When I needed to create similar dots in input[password] I use a custom font in base64 (with 2 glyphs see above 25CF and 2022)
SCSS styles
After that, I got identical display input[password]