Thursday, April 25
CSS Tricks

Unused

I recently wrote Here’s the thing about "unused CSS" tools, where I tried to enumerate all the challenges any tool would have in finding truly "unused" CSS. The overarching idea is that CSS selectors match elements in the DOM, and those elements in the DOM come from all sorts of places: your static templates, dynamic templates based on server-side state, and of course, JavaScript, which can manipulate the DOM in any way at all, including pull things from APIs and third parties. With all that at play, how can any tool give us a truly accurate picture of unused CSS, to the point that actually removing that CSS isn't just as dangerous as leaving it alone? So, I said: And yet, I don't think these tools are useless — they are just...tools. Their use can actually be a positive step toward bett...
CSS Tricks

Emojis as Icons

There are lots of unicode symbols that make pretty good icons already, like arrows (←), marks (✘), and objects (✂︎).You can already colorize these like a normal font glyph. Then, there are emojis, those full-color suckers we all know about. What if you could take just the shape of an emoji and use it like a normal glyph? You can! Preethi Sam shows how: .icon { color: transparent; text-shadow: 0 0 #ec2930; } Plus, an alternate technique using background-clip. Note that emojis render differently across platforms, so careful! Direct Link to Article — PermalinkThe post Emojis as Icons appeared first on CSS-Tricks. Source: CSS-tricks.com
How To Create A Flat Vector Illustration In Affinity Designer
Web Tricks

How To Create A Flat Vector Illustration In Affinity Designer

How To Create A Flat Vector Illustration In Affinity DesignerHow To Create A Flat Vector Illustration In Affinity Designer Isabel Aracama 2018-07-11T20:00:02+02:00 2018-07-11T18:05:32+00:00 (This is a sponsored post.) If you are in the design world, chances are that you’ve already heard about Affinity Designer, a vector graphics editor for Apple’s macOS and Microsoft Windows. It was July 2015 when Serif Europe launched the amazing software that many designers and illustrators like me are using now as their main tool for professional work. Unlike some other packages, its price is really affordable, there’s no subscription model and, as mentioned already, it’s a...
Hyperlinking Beyond the Web
CSS Tricks

Hyperlinking Beyond the Web

Hyperlinks are the oldest and the most popular feature of the web. The word hypertext (which is the ht in http/s) means text having hyperlinks. The ability to link to other people’s hypertext made the web, a web — a set of connected pages. This fundamental feature has made the web a very powerful platform and it is obvious that the world of apps needs this feature. All modern platforms support a way for apps to register a URI (custom protocol) and also have universal links (handling web links in an app). Let’s see why we’d want to take advantage of this feature and how to do it. Why have app links at all? Creating URIs that apps can open provides a unique set of benefits. A URL encapsulates the entire state of the webpage (it used to before the advent of Single Page Applications (SPAs) h...
Web Tricks

Learning To Code By Writing Code Poems

Learning To Code By Writing Code PoemsLearning To Code By Writing Code Poems Murat Kemaldar 2018-07-11T14:00:32+02:00 2018-07-11T15:57:59+00:00 Back in 2008, I started studying design and clearly remember how the sheer sight of code just intimidated me. I had some coding classes, and without any prior coding experience, I had a tough time understanding the code I first got in touch with. Suddenly, the words that I was used to in the English language (such as “new,” “return” and “throw/catch”) took on a whole new meaning; the cryptic syntax, semicolons, brackets and completely new rules didn’t make things any easier for me. If you are new to JavaScript and/or h...
7 Ways to Increase Website Security, Without Sacrificing UX
Web Tricks

7 Ways to Increase Website Security, Without Sacrificing UX

Did you know that the longest word in the English dictionary is 189,891 letters long? It is (and you can see a full spelling here). This word is the name for a protein dubbed “Tintin” and would take you more than 3 and a half hours to say out loud. Pretty crazy, right? But why in the world am I sharing this with you today? Because 189,891 letters is way too long! It could have been reduced to 50, 25, or even 10 letters, but it wasn’t. Why? Because people love to complicate things. And nowhere is this more true than in the realm of online security and user experience. You see, most self-proclaimed gurus will try and overwhelm you with fancy industry jargon and advanced (but entirely unnecessary) security recommendations in order to appear like they know what they’re talking about and sell...
CSS Tricks

Random Day in the Life of a Developer

Yesterday, I started going through my email as soon as I got to work. I always start my day with email. I kinda like email. I read some interesting things in keeping up with the industry. I deal with some business things. I handle with some personal things. I make a note of the most important stuff going on. Then I kept working! I fixed a bug that was affecting Firefox exclusively. This code would set some elements in a row with flexbox, let them wrap, then looked at all of them to see which ones wrapped and which ones didn't. Then it put the ones that wrapped in an overflow menu. Seemed simple enough. But some of the items were in bold text and some were not. The ones that were not bold were somehow pushed down 1.5px in Firefox (but in no other browser I looked at). The code checked to ...
Web Tricks

Build and Understand a Simple Node.js Website with User Authentication

Building websites with user authentication and management (login, registration, password reset, etc.), can be a huge pain. As a developer there are a million little things you need to worry about: Storing the users in your database Making sure you have the right user attributes defined Forcing users to be logged in to view a page Building registration and login forms Creating password reset workflows that email users a link Verifying new users when they sign up via email Etc… The list goes on and on. Today I'm not only going to show you how to quickly build a Node.js website that supports all those things above, I'm going to teach you exactly what's going on behind the scenes so you fully understand how web authentication works. If you've ever been curious about how web authentication and ...
Delivering WordPress in 7KB
CSS Tricks

Delivering WordPress in 7KB

Over the past six months, I've become increasingly interested in the topic of web sustainability. The carbon footprint of the Internet was not something I used to give much thought to, which is surprising considering my interest in environmental issues and the fact that my profession is web-based. The web in a warming world As a brief recap, I attended MozFest in London last year. In between sessions, I was scanning a noticeboard to see what was coming up, and I spotted a session entitled, "Building a Planet-Friendly Web." I felt a little dumbstruck. What on Earth was this going to be about? I attended the session and the scales fell from my eyes. In what now seems obvious — but at the time was a revelation — I learned of the colossal energy demand of the Internet. This demand makes it th...
Web Tricks

Better Collaboration By Bringing Designers Into The Code Review Process

Better Collaboration By Bringing Designers Into The Code Review ProcessBetter Collaboration By Bringing Designers Into The Code Review Process Ida Aalen 2018-07-10T13:50:26+02:00 2018-07-10T16:18:00+00:00 Smooth collaboration between developers and designers is something everyone aspires to, but it’s notoriously difficult. But with today’s advanced web, it's difficult — if not impossible — to build a truly great product without collaborating across disciplines. Because of the range of technologies required to build a product, the product can only truly succeed when all disciplines — developers and designers, content creators, and user experience strategists — a...
Web Tricks

Code Challenge #12: JavaScript String Manipulation

Last time on the Code Challenge #11 we solved problems in JavaScript using functions to manipulate objects. This week on the code challenge we shall delve further into the important basics with String Manipulation challenges. Strings in JavaScript are data types containing characters in single or double quotes. Manipulating Strings are an integral part of app development and is applied in numerous cases from modifying user input data to making UX and UI decisions on a page depending on specific user inputs. The Challenge In this challenge, we'll be solving five problems with possibly increased difficulty from first to last. The five problems are: Padded Number In this challenge, an array is provided and stored in a variable, create a function which evaluates the strings in the array by ad...
CSS Tricks

itty.bitty

Mark this down as one of the strangest things I’ve seen in a good long while. Nicholas Jitkoff has made a tool called itty.bitty that creates websites with all of the assets being contained within their own link. You can create a website without any HTML or CSS resources at all because it’s all been base64 encoded into the URL itself. Take this crazy looking URL, for example: https://itty.bitty.site/#How_it_works/XQAAAAJdDAAAAAAAAAAeHMqHyTY4PyKmqfkwr6ooCXSIMxPQ7ojYR153HqZD3W+keVdvwyoyd+luwncAksxo8PWJs+831jtAVty8rDpGXmyebtxMTP3PSa4g8/593sWue8WaPjJZKXPqJ+G6ffUrBFhdclCfPRZ1gVobusxdd5g4xI5328XhoOoeADUFQZMeRzfBVzcSlEdUqLcxhD5c7kYCBo79g1FR9+rRyw0U3Jyc+5Axt5HWUqKPcEBfQpO35dwvNhCOOZQ/83PRzl51VrpqJ+zwl7UT1JUUK24g/b9zCUO6EIGg1bcZW0VBL53SSK4LE+UkJNv3WKY04UQnISAISa4WghBZjXT5ID0S61leAohaQ9Kqkv6fGfZKI+...
Web Tricks

Use Angular and NativeScript to Build a Web and Mobile Application

Angular has been around for a few years now and since its release it has been useful when creating many different categories of applications, including web as well as mobile. The problem, at least for me, has always been that the experience for creating these various applications has been inconsistent and often confusing even though the driving technology has always been the same. Things have gotten better now that custom schematics can be used with the official Angular CLI. So what does that mean for us? We can take a project created with the Angular CLI, add a schematic, let's say for NativeScript, and end up with CLI compatible for both web and mobile. We're going to see how to use the Angular CLI to build a web and mobile compatible application with the NativeScript schematics. Install...
Little Tip: Draw Your Grid in ASCII in Your CSS Comments for Quick Reference
CSS Tricks

Little Tip: Draw Your Grid in ASCII in Your CSS Comments for Quick Reference

Say you declared a grid like this: body { display: grid; grid-template-columns: min-content 1fr; grid-template-rows: min-content auto min-content; } This depends on content, for sure, but how it's likely to play out is like this: +---+-------------+ | | | | | | +-----------------+ | | | | | | | | | | | | | | | | | | +-----------------+ | | | +---+-------------+ That's really easy to draw out quick in ASCIIFlow Infinity. Now you want to place elements in that grid, and arguably the easiest way to do that is to specify the grid rows/columns they should start/end at. /* grid-area: row-start / column-start / row-end / column end */ .logo { grid-area: 1 / 1 / 2...
Web Tricks

Building Text-to-Speech Apps for the Web

Having interacted with several apps over the years, there is a very high chance that you have interacted with apps that provide some form of voice experience. It could be an app with text-to-speech functionality like reading your text messages or notifications aloud. It could also be an app with voice recognition functionality like the popular Siri or Google Assistant. With the advent of HTML5, there has been a very fast growth in the number of API available on the web platform. Over the years, we have come across API such as WebSocket, File, Geolocation, Notification, Battery, Vibration, DeviceOrientation, WebRTC, etc. Some of these API have gained very high support across various browsers. However, most of them are still in the experimental phase of development and are to be used with mu...