Select Page

Author: admin

Faking env() to Use it Now

There is already an env() function in CSS, but it kinda came out of nowhere as an Apple thing for dealing with “The Notch” but it has made it’s way to be a draft spec. The point will be for UAs or authors to declare variables that cannot be changed. Global const for CSS, sorta. That spec doesn’t seem to suggest how we’ll actually set those env() values just yet. If you want them now, the easiest way to fake them would be using regular ol’ CSS custom properties and simply not change them. But if you want that env() syntax though, there is a PostCSS plugin for emulating it. The way the plugin handles them is through a JavaScript file that declares them. postcssCustomProperties({ importFrom: 'path/to/file.js' /* module.exports = { environmentVariables: { '--branding-padding': '20px', '--branding-small': '600px' } } */ }); Having them start life as JavaScript is interesting, as it means we could perhaps have a single place to set variables that are accessible both to JavaScript and CSS. That’s what Harry Nicholls covers more in his article, “Why you should use CSS env()” like some gotchas when dealing with units and such. But if you really needed a single source for unchangeable variables in both CSS and JavaScript, then I’d say this is a good way to go — and could potentially be ripped out once support...

Read More

Privacy UX: Better Notifications And Permission Requests

Privacy UX: Better Notifications And Permission Requests Privacy UX: Better Notifications And Permission Requests Vitaly Friedman 2019-04-18T17:00:49+02:00 2019-04-18T17:05:35+00:00 Part 1: Privacy Concerns And Privacy In Web Forms Part 2: Better Cookie Consent Experiences Part 3: Better Notifications UX And Permission Requests Part 4: Privacy-Aware Design Framework Imagine you are late for one of those meetings that you really don’t want to be late to. You hastily put on your shoes and your coat and fetch your door keys and grasp for the door handle — just to head out in time. As you are stepping down the stairs, you...

Read More

8 Best Project Management Systems and CRMs on CodeCanyon

Project management and CRM (customer relationship management) entail tracking all aspects of a business from planning, assigning tasks, follow-up, task management, and invoicing—along with many more activities. The success of any website or business largely depends on the structures put in place to ensure the smooth running of operations. From planning and task assignment to deadlines and team management, all these activities need a proper system in place. A project management system is the best solution to ensure synchronization of teams, projects, and tasks. And a CRM helps manage customer contacts and invoices. Luckily, CodeCanyon offers many of these apps,...

Read More

Best JavaScript Forms of 2019

Forms are an essential part of almost every website. They are used for gathering information about users, login and registration, letting users provide feedback, and as a way for users to contact website administrators. Forms are also used for other purposes like booking events and hotel rooms or calculating costs for different items. Basically, forms can be used anywhere you want to ask users for input and then process the input to receive or provide a service or additional information. Your needs will vary greatly depending on your reasons for including a form in your website. For example, login...

Read More

Clever code

This week, Chris Ferdinandi examined a clever JavaScript snippet, one that’s written creatively with new syntax features, but is perhaps less readable and performant. It’s a quick read, but his callout of our industry’s fixation on cleverness is worth… calling out: …we’ve become obsessed as an industry with brevity and clever code, and it results in code that’s sometimes less performant, and typically harder to read and make sense of for most people. He made a similar argument late last month when he wrote about code readability, noting that brevity might look cool but ultimately leads to all sorts of issues in a codebase: Often, web developers are obsessed with brevity. There’s this thing were developers will try to write the same function in the fewest number of characters possible. Personally, I think brevity is pointless. Readability is a lot more important. I entirely agree with Chris on this point, however, I think there is one important distinction to make and that’s the difference between code that’s intended as a prototype and code that’s intended for production. As Jeremy Keith argued a short while ago: What’s interesting is that—when it comes to prototyping—our usual front-end priorities can and should go out the window. The priority now is speed. If that means sacrificing semantics or performance, then so be it. If I’m building a prototype and I find myself thinking...

Read More
www.000webhost.com