Thursday, February 20

Tag: css

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
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...
Flutter: Google’s take on cross platform
CSS Tricks

Flutter: Google’s take on cross platform

Flutter is a mobile SDK that, at its core, is about empowering everyone to build beautiful mobile apps. Whether you come from the world of web development or native mobile development, Flutter makes it easier to create mobile apps in a familiar, simplified way, without ever giving up control to the framework. As of this writing, Google AdWords and Alibaba are both using Flutter in production. You can see more examples of who’s using Flutter (including the app I’ve worked on) on Flutter’s website on the showcase page. Right now, there’s a lot of buzz about Flutter. The question I see most often is, "Flutter or React Native...which one should I use?" Like all things in programming, its all about the tradeoffs you’re willing to make. I’m going to try to convince you that Flutter is the best ...
Render Caching for React
CSS Tricks

Render Caching for React

Server Side Rendering (SSR) is a very useful technique that makes web apps appear faster. The initial HTML is displayed before the JavaScript is parsed and, while the user is deciding what to tap on, our handlers are ready. Server side rendering in React requires additional work to setup and has server costs. Furthermore, if your server team cannot have JavaScript running on your servers, you are stuck. It significantly complicates the CDN setup especially if you have pages that require login and where the user’s information is managed. I want to walk through a new concept called Render Caching. This is a cool trick that can give users an instant performance boost just like that of SSR without having to resort to writing code on the server. What is Render Caching? The migration from stati...
CSS Tricks

New mobile Chrome feature would disable scripts on slow connections

This is a possible upcoming feature for mobile Chrome: If a Data Saver user is on a 2G-speed or slower network according to the NetInfo API, Chrome disables scripts and sends an intervention header on every resource request. Users are shown a UI at the bottom of the screen indicating the page has been modified to save data. Users can enable scripts on the page by tapping “Show original” in the UI.   And the people shout: progressive enhancement! Jeremy Keith: An excellent idea for people in low-bandwidth situations: automatically disable JavaScript. As long as the site is built with progressive enhancement, there’s no problem (and if not, the user is presented with the choice to enable scripts). Power to the people! This reminds me of the importance of a very useful bui...
Props and PropTypes in React
CSS Tricks, Web Tricks

Props and PropTypes in React

React encourages developers to build by breaking a UI up into components. This means there will always be a need to pass data from one component to another — more specifically, from parent to child component — since we’re stitching them together and they rely on one another. React calls the data passed between components props and we’re going to look into those in great detail. And, since we’re talking about props, any post on the topic would be incomplete without looking at PropTypes because they ensure that components are passing the right data needed for the job. With that, let’s unpack these essential but loaded terms together.   Props: The data being passed around Basically, props are what make React the tool that it is. React was designed to break things down into pie...
CSS Shape Editors
CSS Tricks

CSS Shape Editors

Firefox 62 is shipping out of beta on September 5th. The big notable thing for CSS developers is that it will now support the shape-outside property with polygon(), circle(), and ellipse(), joining Chrome and Safari.   What will be nice about the Firefox release (well, it's kinda already nice if you use something like Firefox Developer Edition which is already on 62), is that it has a shape editor built right into DevTools. Chrome supports shape-outside as well, but there is no native DevTools helper for working with them. Thankfully, Razvan Caliman has a Chrome Plugin that does a great job. (Razvan contributed to the Firefox version as well, I hear.)   I enjoy using shape-outside as it can add real visual interest to a page that isn't nearly overdone or trendy just ...
The Ecological Impact of Browser Diversity
CSS Tricks

The Ecological Impact of Browser Diversity

Early in my career when I worked at agencies and later at Microsoft on Edge, I heard the same lament over and over: "Argh, why doesn’t Edge just run on Blink? Then I would have access to ALL THE APIs I want to use and would only have to test in one browser!" Let me be clear: an Internet that runs only on Chrome’s engine, Blink, and its offspring, is not the paradise we like to imagine it to be. As a Google Developer Expert who has worked on Microsoft Edge, with Firefox, and with the W3C as an Invited Expert, I have some opinions (and a number of facts) to drop on this topic. Let’s get to it.   What is a browser, even? Let’s clear up some terminology. Popular browsers you know today include Google Chrome, Apple Safari, Mozilla Firefox, and Microsoft Edge, but in the past ...
“View Source” in DevTools
CSS Tricks

“View Source” in DevTools

When the conversation about the value of "View Source" rolls around, the #1 response I hear is along these lines: No way, Jose! I use View Source all the time! It's very useful when you want to look at the raw HTML, not the DOM. Yes, that is useful, and yes, there is a difference. But just because you are looking at DevTools doesn't mean the DOM is the only thing you can see.   This is Chrome DevTools. Safari has a Resources tab There is also a Network tab in DevTools for every browser. That's where you find a way to look at the document. Firefox's Network tab So, if your concern about losing View Source is that you'd have no possible way to see the document instead of just the DOM, that's just not true. You can rest assured that you have the same affordance in DevTools. ...
An Intro to Web Site Testing with Cypress
CSS Tricks

An Intro to Web Site Testing with Cypress

End-to-end testing is awesome because it mirrors the user’s experience. Where you might need a ton of unit tests to get good coverage (the kind where you test that a function returns a value you expect), you can write a single end-to-end test that acts like a real human as it tests several pieces of your app at once. It’s a very economical way of testing your app. Cypress is a new-ish test runner with some features that take some of the friction out of end-to-end testing. It sports the ability to automatically wait for elements (if you try to grab onto an element it can’t find), wait for Ajax requests, great visibility into your test outcomes, and an easy-to-use API. Note: Cypress is both a test runner and a paid service that records your tests, allowing you to play them back later. This ...
Super-Powered Grid Components with CSS Custom Properties
CSS Tricks

Super-Powered Grid Components with CSS Custom Properties

A little while ago, I wrote a well-received article about combining CSS variables with CSS grid to help build more maintainable layouts. But CSS grid isn’t just for pages! That is a common myth. Although it is certainly very useful for page layout, I find myself just as frequently reaching for grid when it comes to components. In this article I’ll address using CSS grid at the component level. Grid is neither a substitute for flexbox nor vice versa. In fact, using a combination of the two gives us even more power when building components. Building a simple component In this demo, I’ll walk through building a text-and-image component, something you might commonly find yourself building on a typical site, and which I have frequently built myself. This is what our first component should look...
CSS Tricks

​Reinvest Your Time With HelloSign API

(This is a sponsored post.)G2 Crowd says HelloSign's API is 2x faster to implement than any other eSign provider. What are you going to do with all the time you save? Try it free Today! Direct Link to Article — PermalinkThe post ​Reinvest Your Time With HelloSign API appeared first on CSS-Tricks. Source: CSS-tricks.com