Search

Nalezeno "css-tricks": 2942

Recreating Game Elements for the Web: The Among Us Card Swipe


As a web developer, I pay close attention to the design of video games. From the HUD in Overwatch to the catch screen in Pokemon Go to hunting in Oregon Trail, games often have interesting mechanics and satisfying interactions, … The post Recreating Game Elements for the Web: The Among...

SVG within CSS


Stefan Judis has a “Today I Learned” (TIL) post explaining how SVGs filters can be inlined in CSS. The idea is that CSS has the filter property which supports some built-in functions, like grayscale(100%) and stuff like that. But … The post SVG within CSS appeared first...

Animating a CSS Gradient Border


This little trick for gradient borders is super useful: .border-gradient { border: 5px solid; border-image-slice: 1; border-image-source: linear-gradient(to left, #743ad5, #d53a9d); } Here’s some basic demos from our article on the subject. Sephanie Eckles was sharing around the idea...

(Jay Freestone’s) Front-end predictions for 2021


React framework maturity, early container queries, WASM adoption, and monoliths. I’ll take all four, please. Not feeling like a particularly front-end-y? Jay says: Interestingly, the biggest developments in the front-end are unlikely to be traditionally front-end concerns. Back...

Exploring the Complexities of Width and Height in CSS


The following article is co-authored by Uri Shaked and Michal Porag. Let’s explore the complexities of how CSS computes the width and height dimensions of elements. This is based on countless late-night hours debugging and fiddling with lots of … The post Exploring the Complexities of Width...

Some React Blog Posts I’ve Bookmarked and Read Lately


The React Hooks Announcement In Retrospect: 2 Years Later — Ryan Carniato considers hooks to be the most significant turning point in front end in the past five years, but he also says hooks have muddied the waters as well. … The post Some React Blog Posts I’ve Bookmarked and Read...

Some Typography Blog Posts I’ve Bookmarked and Read Lately


Font-size: An Unexpectedly Complex CSS Property — From Manish Goregaokar in 2017. Of many oddities, I found the one where font: medium monospace renders at 13px where font: medium sans-serif renders at 16px particularly weird. The good line-height — Since … The post Some Typography Blog...

Lazy Load Routes in Vue with webpack Dynamic Comments


The way routing works in JavaScript is usually that you specify which relative URL pattern you want for which component to render. So for /about you want the <About /> component to render. Let’s take a look at how to … The post Lazy Load Routes in Vue with webpack Dynamic Comments...

Algolia


Algolia is for search. Literally any website can take advantage of Algolia-powered search. You put JSON data (“records”) in, and then you can search them at lightning speed. The magic of Algolia is that they help you with both of … The post Algolia appeared first...

Some Performance Blog Posts I’ve Bookmarked and Read Lately


Back/forward cache — I always assumed browsers just do fancy stuff with the back/forward buttons and us developers had very little control. Philip Walton tells us it’s critical that we understand “what makes pages eligible (and ineligible) for bfcache to … The post Some...

Going From Solid to Knockout Text on Scroll


Here’s a fun CSS trick to show your friends: a large title that switches from a solid color to knockout text as the background image behind it scrolls into place. And we can do it using plain ol’ HTML and … The post Going From Solid to Knockout Text on Scroll appeared first...

The Web is for More Than Document Viewing


I poked at a tweet from Ken Kocienda over the weekend: “Water not wet” reports man standing in ocean. https://t.co/5oUUdWARTU — Chris Coyier (@chriscoyier) January 31, 2021 I don’t know Ken, so I feel a little bad for being harsh. … The post The Web is for More Than Document...

I Saw Two Mega Menus Today…


One was the footer of an (older) U.S. Government website. The other was the navigation for AWS services from the AWS Console. The post I Saw Two Mega Menus Today… appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter

Dynamically Switching From One HTML Element to Another in Vue


A friend once contacted me asking if I had a way to dynamically change one HTML element into another within Vue’s template block. For instance, shifting a <div> element to a <span> element based on some criteria. The trick was … The post Dynamically Switching From One HTML...

“Cancelable” Smooth Scrolling


Here’s the situation: Your site offers a “scroll back to top” button, and you’ve implemented smooth scrolling. As the page scrolls back to the top, users see something that catches their eye and they want to stop the scrolling, so … The post “Cancelable”...

Open Web Docs


Robert Nyman: Open Web Docs was created to ensure the long-term health of web platform documentation on de facto standard resources like MDN Web Docs, independently of any single vendor or organization. Through full-time staff, community management, and … The post Open Web Docs...

Figma Crash Course


Totally free course from Pablo Stanley. Can’t beat that. Figma is just blowing up, and for good reason. It’s good software aligned with what digital designers need. It’s fast. It’s on the web, so you can’t lose stuff and … The post Figma Crash Course appeared...

No-Jank CSS Stripes


My mind goes immediately to repeating-linear-gradient and hard-stop gradients when thinking of creating stripes in CSS. You make one stripe by using the same color between two color stops, and another stripe (or more) but using a different color … The post No-Jank CSS Stripes appeared first...

Bulletproof flag components


A clever use of CSS grid from Jay Freestone to accomplish a particular variation of the media object design pattern (where the image is centered with the title) without any magic numbers anything that isn’t flexible and resiliant. The trick … The post Bulletproof flag components...

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