1. Console.time
You can use console.time()
to starts a timer to track how long an operation takes. Also, you can also use the timeLog method in between the start and the end of the timer. Hereβs a quick example:
Β
2. The importance of input types
You can improve the UX of your app by using the correct input type so the phones/tablets can choose the best keyboard to show to the end user:
Β
3. CSS where
The :where()
Css pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. The code below produce the same output (exept the specificity is different) but the second one is more concise:
There's a lot to say about :is()
and :where()
. if you want to read more aboute these pseudo-class selectors, you can click on the link below π
Β
Hi there! I'm Mustapha, a technical writer, speaker and a passionate JS / TS developer. Follow me on Twitter for daily tech tips π
Β
4. The spellcheck attribute
The spellcheck attribute defines whether an element may be checked for spelling errors.
You can use it in text inputs, textarea and editable content (elements with contenteditable="true"
).
Β
5. Attribute selectors
Did you know about the different ways you can use the attribute selectors in CSS?
Have a look:
Note that the selector is case sensitive. If you want it to be case insensitive, add an I before the closing bracket:
Β
Β
That's all for now. I hope you found this useful!
Leave a comment to let me know which tip (if any) you found useful ‡
Until next time, have a nice week!
Β
Top comments (4)
These are awesome and I will be trying them out :)
Thank you π I am glad you like them!
That CSS :where() is a lifesaver for time. I'll definitely be using it for my next project
I will use these in my codes.