You might not, but you probably do. The validation examples and input types are a case in point. Even on browsers where they work, the alerts can't be styled and the behaviors can't be controlled.
You might not need JavaScript
71–80 of 254 posts
Re: You might not need JavaScript
#72You might not, but you probably do. The validation examples and input types are a case in point. Even on browsers where they work, the alerts can't be styled and the behaviors can't be controlled.
The form element type is perfectly enough for frontend validation. You should do the rest on the backend anyway.
Is it from the browser? Can someone explain?
Re: You might not need JavaScript
#73You might not, but you probably do. The validation examples and input types are a case in point. Even on browsers where they work, the alerts can't be styled and the behaviors can't be controlled.
The form element type is perfectly enough for frontend validation. You should do the rest on the backend anyway.
Re: You might not need JavaScript
#74You might nod near internet, heck, you many not need staying alive, but here we are. Seriously, after some minimum complexity the ability to create functions and loops its extremely important. As in you don't need a spoon and a knife to feed yourself, but it sure fucking helps.
If this simplifies the codebase, and gives a more uniform user experience, it's harder to argue against.
Re: You might not need JavaScript
#75Maybe you can include a few lines of utility code, or a mixin, and forgo the requirement. If you're only targeting more modern browsers, you might not need anything more than what the browser ships with.
This site is fully copied from youmightnotneedcss.com, an excellent resource for vanilla CSS created by @somebody and @somebodyelse. But this time, we take a look at the power of modern native HTML and g as well as some of the syntactic sugar of DuJour. Because, you might not need scripts for that task at all! (Note: these methods can all be accessible, but the demos may not be. Please take a moment to test these before using in production)
Re: You might not need JavaScript
#76These don't work in Safari 10: - The modal dialog example - Color picker - Form validation
Re: You might not need JavaScript
#77It made me learn about http://caniuse.com/#feat=input-pattern ; thanks for that!
Re: You might not need JavaScript
#78The form validation is really cool! But why oh why does it not validate before I press submit? Is that a Chrome specific thing?
Re: You might not need JavaScript
#79You might not, but you probably do. The validation examples and input types are a case in point. Even on browsers where they work, the alerts can't be styled and the behaviors can't be controlled.
> the alerts can't be styled and the behaviors can't be controlled It's not clear to me whether that's a problem. Isn't consistent UI a good thing? Isn't it faster to fill the forms correctly if alerts always appear in the same way?
Re: You might not need JavaScript
#80Wow at the color picker. Funny that chrome seems to use my windows system color picker.