Thursday, April 25

Author: phpInfo

“Killing the URL”
CSS Tricks

“Killing the URL”

It was Safari who first started hiding the complete URL. Here's what CSS-Tricks looks like even when you're on an article page by default in Safari: The full URL path is hidden.You can only fix it (YES, FIX IT) by checking "Show full website address" in settings. Preferences > AdvancedWe've already damaged the sanctity of URLs in a way with URL shorteners. Thankfully, those are used less and less with social networks, like Twitter, not counting the URL toward the total tweet character count anymore. Now, Lily Hay Newman reports Chrome sees problems as well: "People have a really hard time understanding URLs," says Adrienne Porter Felt, Chrome's engineering manager. "They’re hard to read, it’s hard to know which part of them is supposed to be trusted, and in general I don’t think URLs a...
CSS Tricks

Shadow DOM in Ionic

Mike Hartington glows about how good and useful the Shadow DOM is: [Shadow DOM is] actually built on two simple ideas, isolation and location. Need to create a bit of DOM that is isolated from the global scope? Shadow DOM is here to help. Need to specify the exact location of a piece of DOM? Shadow DOMs scope API is what you need! It can be helpful to think of components that use Shadow DOM as modules for HTML. Markup and styles are isolated to their own DOM tree, and removed from the global context. Last time we talked about it around here, I showed how Twitter is using it for embedded tweets — which is a pretty awesome use case — and how it can fall back to an iframe. Mike says they polyfill it in unsupported situations. I suspect isolated styles is the primary selling point for any o...
CSS Tricks

Working With Events in React

Most of the behavior in an application revolves around events. User enters a value in the registration form? Event. User hits the submit button? Another event. Events are triggered a number of ways and we build applications to listen for them in order to do something else in response. You may already be super comfortable working with events based on your existing JavaScript experience. However, React has a distinct way of handling them. Rather than directly targeting DOM events, React wraps them in their own event wrapper. But we’ll get into that. Let’s go over how to create, add and listen for events in React. Creating Events We’ll start by creating a form that has an input and a button. An event will be triggered when a value is entered. The button is used to call a function which will ...
Getting Started With Machine Learning
Web Tricks

Getting Started With Machine Learning

Getting Started With Machine LearningGetting Started With Machine Learning Alvin Wan 2018-09-07T14:00:26+02:00 2018-09-07T14:07:14+00:00 The goal of machine learning is to find patterns in data and use those patterns to make predictions. It can also give us a framework to discuss machine learning problems and solutions — as you’ll see in this article. First, we will start with definitions and applications for machine learning. Then, we will discuss abstractions in machine learning and use that to frame our discussion: data, models, optimization models, and optimization algorithms. Later on in the article, we will discuss fundamental topics that underlie all ma...
4 Best Practices for Designing Mega-Footers
Web Tricks

4 Best Practices for Designing Mega-Footers

Have you ever visited a website, looked around for a bit, and then headed straight to the footer to find the information you were looking for? You’re not the only one. Footers are unique pieces of screen real estate that offer a number of benefits. They house important information (like contact details and copyright statements) and navigation options that make it easier for users to find what they’re looking for. In this article, we’ll talk about the importance of website footers and how you can use them to help your website’s visitors easily find what they’re looking for. We’ll also walk through some of the best practices you should keep in mind when designing mega-footers—the footer equivalent of the mega-menu. Why Footers Are Important We’re inclined to put a lot of effort into designi...
Web Tricks

Using Font Awesome 5 with React

Font Awesome is an... awesome (sorry I had to) product. React is a brilliant coding library. It would only make sense to use them together. I've been using Font Awesome for a long time and was stoked when their Kickstarter for the new version went live. There's a whopping 3,978 icons as of the time of this writing! We use React and Font Awesome together whenever you see an icon here on Scotch. That includes the user navigation, cards, brand icons, and more. While the Font Awesome team has made a React component to make this integration easy, I found a couple gotchas and had to understand some fundamental things about the new Font Awesome 5 and how it's structured. I'll write up what I found and the ways to use the React Font Awesome component. Ways to use Font Awesome Normally, if you we...
CSS Tricks

The Complete CSS Demo for OpenType Features

I'm very glad a guide for these features exists because we already know there are so many weird things that variable fonts can do — well done, Tunghsiao Liu! There are quite a few possible values for font-feature-settings, like, ya know: aalt, swsh, cswh, calt, hist, hlig, locl, rand, nalt, cv01-cv99, salt, subs, sups, titl, rvrn, liga, dlig, size, ornm, ccmp, kern, mark, mkmk, smcp, c2sc, pcap, c2pc, unic, cpsp, case, ital, ordn, lnum, onum, pnum, tnum, frac, afrc, dnom, numr, sinf, zero, mgrk, flac, dtls, ssty, ss01-ss20, smpl, trad, tnam, expt, hojo, nlck, jp78, jp83, jp90, jp04, hngl, ljmo, tjmo, vjmo, fwid, hwid, halt, twid, qwid, pwid, palt, pkna, ruby, hkna, vkna, rlig, init, medi, and fina ...to name a few. Direct Link to Article — PermalinkThe post The Complete CSS Demo for OpenT...
CSS Tricks

Helping a Beginner Understand Getting a Website Live

I got a great email from a fellow named Josh Long the other day. He is, in his words, "relatively new to web design" and was a bit stuck on the concept of getting a site live. I should say that I'm happy to get emails like this an I always read them, but I typically can't offer tech support over email. If I can respond at all, I normally point people to other community resources. In this case, it struck me what a perfect moment this is for Josh. He's a little confused, but he knows enough to be asking a lot of questions and sorting through all this stuff. I figured this was a wonderful opportunity to dig into his questions, hopefully helping him and just maybe helping others in a similar situation. Here's one of the original paragraphs Daniel sent me, completely unedited: I’m relatively ...
CSS Tricks

Level up your hosting. Get started on DigitalOcean with $100.

(This is a sponsored post.)Tired of slow, unreliable web hosting? See how easy it is to self-host your next project on DigitalOcean's cloud platform. Build and manage ultra-fast websites, blogs, and other static web pages using our user-friendly control panel or simple API, all with a 99.99% uptime SLA. Save time using our One-Click install apps for WordPress, Ghost and Discourse. Never worry about running out of storage space again with Spaces — highly scalable, affordable object storage. Sign up today with a free $100 credit for CSS-Tricks readers. Direct Link to Article — PermalinkThe post Level up your hosting. Get started on DigitalOcean with $100. appeared first on CSS-Tricks. Source: CSS-tricks.com
How to convince someone to start using Google Tag Manager?
Google Tag Manager

How to convince someone to start using Google Tag Manager?

Here’s a situation: you’ve read several articles introducing Google Tag Manager and how can it help you improve marketing and analytics processes by bringing control back to the hands of marketers/analysts. So you decide to introduce it to your company/client. However, you face resistance. For example, a lead developer of your company says that Google Tag Manager will bring chaos, slow down the website, and might increase security risks. “A marketer can add any tracking codes to a website/web application all by himself/herself? No, thank you. This is a recipe for disaster”, says the lead developer. Unfortunately, you’re lacking GTM skills in order to come up with counter-arguments, therefore, you have to accept the rejection. The end. But what if you could bring strong points to the table?...
Web Tricks

Designing A Textbox, Unabridged

Designing A Textbox, UnabridgedDesigning A Textbox, Unabridged Shane Hudson 2018-09-06T13:30:16+02:00 2018-09-06T11:42:22+00:00 Ever spent an hour (or even a day) working on something just to throw the whole lot away and redo it in five minutes? That isn’t just a beginner’s code mistake; it is a real-world situation that you can easily find yourself in especially if the problem you’re trying to solve isn’t well understood to begin with. This is why I’m such a big proponent of upfront design, user research, and creating often multiple prototypes — also known as the old adage of “You don’t know what you don’t know.” At the same time, it is very easy to look at s...
Local Vs. Global Web Design: How to Reach the Right Audience
Web Tricks

Local Vs. Global Web Design: How to Reach the Right Audience

Businesses have more options today in terms of how they get their goods and services out to customers: strictly brick-and-mortar, 100% online, or a combination of the two. Because of this, web design isn’t necessarily as straightforward as we’d like it to be. Of course, there will always be certain best practices to abide by—abundant white space; responsive and mobile-first design; easy-to-find CTAs; streamlined user flow; consistent design and messaging site-wide. But big-picture items aside, what exactly do you need to know about designing for local businesses, global enterprises, and those that attempt to span both categories? Let’s take a look at the differences in designing for audiences based on location. Local vs. Global Web Design, What You Need to Know Below are 4 parts of the we...
Web Tricks

Building the New Scotch.io Animated SVG Logo

In this article we will be looking at how we implemented the new animated logo of Scotch.io, a visual detail to complement all the improvements that the site has experienced. Something like the icing on the cake :) For those who have not yet played a bit with the animation of the new logo, they can do so by moving the cursor inside (to resume animation) or outside (to pause animation) of the logo in the top left corner. If you want to know all the details about how it was implemented, just keep reading! Keeping the Waves Inside the Cup One of the first things we had to do was to keep the waves inside the cup. First we thought about cutting the waves using just a circular HTML element, using border-radius and overflow: hidden in the CSS. However, this was not possible, since the waves had t...
What do we call browser’s native development tools?
CSS Tricks

What do we call browser’s native development tools?

You know, that panel of tools that allows you to do stuff like inspect the DOM and see network requests. How do the companies that make them refer to them? Chrome calls them DevTools. Edge calls them DevTools. Firefox calls them Developer Tools. Safari calls it the Web Inspector. I think it's somewhat safe to generically refer to them as DevTools. Safari is the only browser that doesn't use that term, but I imagine even die-hard Safari users will know what you mean. The post What do we call browser’s native development tools? appeared first on CSS-Tricks. Source: CSS-tricks.com
CSS Tricks

Designing With Code

Wall Street Journal design director Matthew Ström on something near and dear to me: the link between code and design tools: We’re in the middle of a design tool renaissance. In the 8 years since Sketch 1.0 was released, there’s been a wave of competition among traditional design tools. And as the number of tools available to designers grows exponentially, ideas that were once considered fringe are finding a broader audience. One of these ideas will significantly change the way digital products are designed: integrating design and code at a deep level. Figma can update a React code base in real time; InVision, Abstract, and Zeplin have done away with design-developer handoff documents; Framer’s new Framer X can render interactive React components directly into its workspace. These examples...