Search

Nalezeno "Article": 1993

The Fragmented, But Evolving State of CSS-in-JS


TLDR: The CSS-in-JS community has converged on a consistent API. Not so long ago, a Facebook engineer compiled a list of the available CSS-in-JS methodologies. It wasn’t short: aphrodite, babel-plugin-css-in-js, babel-plugin-pre-style, bloody-react-styled, classy, csjs, css-constructor, css-light...

WooCommerce


(This is a sponsored post.) I just read a nicely put together story about WooCommerce over on the CodeinWP blog. WooCommerce started life as WooThemes, sort of a "premium themes" business started by just a couple of fellas who had never even met in person. Two years and a few employees later they...

Fighting FOIT and FOUT Together


Lots from Divya with the setup: There are 2 kinds of problems that can arise when using webfonts; Flash of invisible text (FOIT) and Flash of Unstyled Text (FOUT) ... If we were to compare them, FOUT is of course the lesser of the two evils If you wanna fight FOIT, the easiest tool is...

Google Fonts and font-display


The font-display descriptor in @font-face blocks is really great. It goes a long way, all by itself, for improving the perceived performance of web font loading. Loading web fonts is tricky stuff and having a tool like this that works as well as it does is a big deal for the web. It's such a...

Ease-y Breezy: A Primer on Easing Functions


During the past few months, I’ve been actively teaching myself how to draw and animate SVG shapes. I’ve been using CSS transitions, as well as tools like D3.js, react-motion and GSAP, to create my animations. One thing about animations in general and the documentation these and other animation...

How to Worry About npm Package Weight


It's all too easy to go crazy with the imports and end up with megabytes upon megabytes of JavaScript. It can be a problem as that weight burdens each and every visitor from our site, very possibly delaying or stopping them from doing what they came to do on the site. Bad for them, worse for you....

Nobody is quite wrong.


There are two opposing views on using non-polyfillable new web features that I find are both equally common in our industry: Websites don't need to look the same in every browser. The concept of progressive enhancement helps with that. There are tools, even native language features, that help with...

Reversing an Easing Curve


Let’s take a look at a carousel I worked on where items slide in and out of view with CSS animations. To get each item to slide in and out of view nicely I used a cubic-bezier for the animation-timing-function property, instead of using a standard easing keyword. See the Pen Carousel with reversed...

Annotated Build Processes


When you're putting together a build process for a site, it's so dang useful to look at other people's processes. I ran across Andrew Welch's "An Annotated webpack 4 Config for Frontend Web Development" the other day and was glad he blogged it. If I was kicking off a new site where I wanted...

JavaScript to Native (and Back!)


I admit I'm quite intrigued by frameworks that allow you write apps in web frameworks because they do magic to make them into native apps for you. There are loads of players here. You've got NativeScript, Cordova, PhoneGap, Tabris, React Native, and Flutter. For deskop apps, we've got Electron....

Rendering Lists Using React Virtualized


Working with data in React is relatively easy because React is designed to handle data as state. The hassle begins when the amount of data you need to consume becomes massive. For example, say you have to handle a dataset which is between 500-1,000 records. This can result in massive loads and lead...

Keep Math in the CSS


There is a sentiment that leaving math calculations in your CSS is a good idea that I agree with. This is for math that you could calculate at authoring time, but specifically chose not to. For instance, if you needed a 7-column float-based grid (don't ask), it's cleaner and more intuitive: .col...

Creating an Animated Login Form for TouchID


I came across this amazing Dribbble shot by Jakub Reis a while back. It caught my eye and I knew that I just had to try recreating it in code. At that moment, I didn’t know how. I tried out a bunch of different things, and about a year later, I finally managed to make this demo. I learned a couple...

Why isn’t it <style src=””>?


The way JavaScript works is we can do scripts as an inline block: &#60;script&#62; let foo = "bar"; &#60;/script&#62; Or, if the script should be fetched from the network... &#60;script src="/js/global.js"&#62;&#60;/script&#62; With CSS, we can do an inline block of styles: &#60;style&#62; .foo...

An Introduction and Guide to the CSS Object Model (CSSOM)


If you've been writing JavaScript for some time now, it's almost certain you've written some scripts dealing with the Document Object Model (DOM). DOM scripting takes advantage of the fact that a web page opens up a set of APIs (or interfaces) so you can manipulate and otherwise deal with elements...

Google Labs Web Components


I think it's kinda cool to see Google dropping repos of interesting web components. It demonstrates the possibilities of cool new web features and allows them to ship them in a way that's compatible with entirely web standards. Here's one: &#60;two-up&#62; I wanted to give it a try, so I linked...

What do you name color variables?


What naming scheme do you use for color variables? Have you succeeded at writing CSS that uses color variables in a manner agnostic to the colors they represent?I&#39;ve tried all of the following, and I have yet to succeed at writing CSS that works well with any color scheme....

Compound Components in React Using the Context API


Compound components in React allow you to create components with some form of connected state that’s managed amongst themselves. A good example is the Form component in Semantic UI React. To see how we can implement compound components in a real-life React application, we’ll build a compound...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace