This has all sorts of related issues, such as having to deal with selections and caret placement and characters changing as you type. These require intercepting the keyup or oninput event and then reassigning the text. In the past I've used JavaScript for this, text-transform is much better than JavaScript based solutions. This converts text as you type without requiring any JavaScript code, so this is a low impact solution if you need to have fields with specific case requirements. You can apply various text transformation filters to text input fields that provide things like uppercase, lowercase and capitalize among others: It's not even a new-ish CSS property - it's been around for quite some time in browsers, but somehow for all these years I've missed it. I learned something new about CSS today: The text-transform style that allows you to apply a filter to text based input.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |