Search

Nalezeno "css-tricks": 2941

Getting to Know the useReducer React Hook


useReducer is one of a handful of React hooks that shipped in React 16.7.0. It accepts a reducer function with the application initial state, returns the current application state, then dispatches a function. Here is an example of how it is used; const [state, dispatch] = useReducer(reducer...

Spam Detection APIs


I was trying to research the landscape of these the other day — And by research, I mean light Googling and asking on Twitter. Weirdly, very little comes to mind when thinking about spam detection APIs. I mean some kind of URL endpoint, paid or not, where you can hit it with a block of text...

Spam Detection APIs


I was trying to research the landscape of these the other day — And by research, I mean light Googling and asking on Twitter. Weirdly, very little comes to mind when thinking about spam detection APIs. I mean some kind of URL endpoint, paid or not, where you can hit it with a block of text...

Why I don’t use web components


Here’s an interesting post by Rich Harris where he’s made a list of some of the problems he’s experienced in the past with web components and why he doesn’t use them today: Given finite resources, time spent on one task means time not spent on another task. Considerable energy has been expended...

Render Snarky Comments in Comic Sans


Hilarious idea by Zach Leatherman. To test if a comment is "snarky" or not, there is an npm package up to the task. On this site, we generally just delete snarky comments, but I still run a WordPress plugin that allows me to "feature" or "bury" comments. It's old but it still works fine in...

Building a Conference Schedule with CSS Grid


It’s hard to beat the feeling of finding a perfect use for a new technology. You can read every handy primer under the sun and ooh-and-ahh at flashy demos, but the first time you use it on your own project… that’s when things really click. I gained a new appreciation for CSS Grid when building...

Reduced Motion Picture Technique, Take Two


Did you see that neat technique for using the <picture> element with <source media=""> to serve an animated image (or not) based on a prefers-reduced-motion media query? After we shared that in our newsletter, we got an interesting reply from Michael Gale: What about folks who love...

Hello Subgrid!


Rachel Andrew’s talk at CSSconf is wonderful because it digs into one of the most exciting changes that’s coming soon to a browser near you: subgrid! That’s a change to the CSS Grid spec that allows for much greater flexibility for our visual designs. Subgrid allows us to set one grid on an entire...

Managing WordPress Metadata in Gutenberg Using a Sidebar Plugin


WordPress released their anticipated over to the post editor, nicknamed Gutenberg, which is also referred to as the block editor. It transforms a WordPress post into a collection of blocks that you can add, edit, remove and re-order in the layout. Before the official release, Gutenberg...

So, you think you’ve got project management nailed down


Who needs a project manager? You're an organized person who can keep track of your own work, right? Wrong. Well, wrong if you're part of a team. The thing about being self-organized is that it's related to project management but not synonymous with it. Case in point: what happens if your project...

So, you think you’ve got project management nailed down


(This is a sponsored post.) Who needs a project manager? You're an organized person who can keep track of your own work, right? Wrong. Well, wrong if you're part of a team. The thing about being self-organized is that it's related to project management but not synonymous with it. Case in point:...

How to Increase Your Page Size by 1,500% with webpack and Vue


What we don’t have are enough articles showing you how to increase your page size. In fact, the only article I could find was this one from the Geek Squad which ended up being about making the font size bigger. This is a good start, but I think we can do better. The post How to Increase Your Page...

Drop caps & design systems


Ethan Marcotte has written up his process for how to make drop caps accessible for screen readers and browsers alike. All of that is very interesting and I’m sure I’ll use a technique like this in the near future, but the part that made me hop out of my seat is where Ethan notes his experience with...

Every Layout


Every Layout is a new work-in-progress website and book by Heydon Pickering and Andy Bell that explains how to make common layout patterns with CSS. They describe a lot of the issues when it comes to the design of these layouts, such as responsive problems and making sure we all write maintainable...

How to Section Your HTML


The sectioning elements in HTML5 are <nav>, <aside>, <article>, and <section>. <body> is also kind of a sectioning element since all content lying inside of it is part of the default document section. Here is a brief explanation of each sectioning element...

Managing State in React using Unstated-Next


In a previous post, we saw how to manage state using Unstated. As you might recall, Unstated uses React’s built-in setState to allow you create components that can consume state by subscribing to a provider — like the React’s Context API. Well, we’re going to build off that last post by looking...

Components, yo.


I see VuePress just went 1.0. Explained simply, it's a static site generator based on Vue. But of course, you work in Vue, which means you work in components. All the modern JavaScript frameworks are component-based. Even when they disagree with each other about specific things (like how Svelte...

Weekly Platform News: CSS Scroll Snap, Opera GX, PWA Install Icon


In this week's roundup, Chrome is adding an install option for Progressive Web Apps, Opera GX comes to Windows, the ECMAScript proposals get an update, and CSS Scroll Snap is coming to a Firefox browser near you. The post Weekly Platform News: CSS Scroll Snap, Opera GX, PWA Install Icon appeared...

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