Stefan Sinca’s Post

View profile for Stefan Sinca

Full Stack Engineer @ ING Hubs Romania | Node.JS · TypeScript · Penetration Testing

Did you know about 𝐜𝐥𝐚𝐦𝐩()? 𝐜𝐥𝐚𝐦𝐩()'s a method used in CSS that let's you set a range of values for a property of an element. Let's say you have a <𝐡𝐞𝐚𝐝𝐞𝐫 /> and you want to set a minimum, maximum value and a sort of standard one for the width of the element. How'd you do it? There's 𝐦𝐢𝐧/𝐦𝐚𝐱-𝐰𝐢𝐝𝐭𝐡, right? Well, among many other options out there, you can use 𝐜𝐥𝐚𝐦𝐩(). It takes three parameters: 𝐦𝐢𝐧𝐢𝐦𝐮𝐦 width allowed, the 𝐩𝐫𝐞𝐟𝐞𝐫𝐫𝐞𝐝 one and the 𝐦𝐚𝐱𝐢𝐦𝐮𝐦 width allowed. All in one line with the right amount of elegance. Hope you'll get the chance to try it soon. #JS #JavaScript #Software #Web #Programming

  • graphical user interface

To view or add a comment, sign in

Explore content categories