To continue on my previous post here are some more tweets with little Css tips that might help you in your projects.
Prevent users from selecting text.
Small #css tip: You can prevent users from selecting text on your site by setting the css user-select property to none; #100DaysOfCode #DEVCommunity
👇Check out the CodePen below12:27 PM - 11 Mar 2021
User-select docs: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
Css :is()
Small #css tip: Instead of writing out a lot of chained selectors we can use the :is() function to shorten these. #100DaysOfCode #DEVCommunity
👇Check out the CodePen below11:54 AM - 12 Mar 2021
:is() docs: https://developer.mozilla.org/en-US/docs/Web/CSS/:is
Css viewport units.
Small #css tip: Instead of using pixels or rems you can also use css viewport units (vw, vh, vmin, vmax) to make your websites more responsive. #100DaysOfCode #DEVCommunity
👇Check out the CodePen below.12:48 PM - 16 Mar 2021
Css logical properties.
Small #css tip: If you need to support multiple writing directions (rtl, ltr etc...) you could use Css Logical Properties to automatically change your margins, paddings and borders to match the used direction. #100DaysOfCode #DEVCommunity
👇Check out the CodePen below.12:43 PM - 17 Mar 2021
Css logical properties docs: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties
Subscribe and Follow
Subscribe to my Youtube channel.
Thanks for reading/watching and stay safe
Top comments (9)
Whoa,
:is()
is about to be my new favorite 😋Thanks for the nice write-up!
Really cool tips! Never heard about the :is() trick :)
Thanks Manten! In some cases it can really clean up your selectors! :)
Archivado. Gracias.
De nada Jose! :p
Never knew user select property, thanks Stephan.
Your welcome Kashyap! :)
Thanks you for that feedback Dariusz. Safari is becomming the new internet explorer! :p
I get that. I was (partially) kidding of course! But this does make me curious what your thoughts are on this!?