Rendering External API Data in WordPress Blocks on the Back End | CSS-Tricks

[ad_1] This is a continuation of my last article about “Rendering External API Data in WordPress Blocks on the Front End”. In that last one, we learned how to take an external API and integrate it with a block that renders the fetched data on the front end of a WordPress site. The thing is, we accomplished this in a way that prevents us from seeing the data in the

Read More

The New CSS Media Query Range Syntax | CSS-Tricks

[ad_1] We rely on CSS Media Queries for selecting and styling elements based on a targeted condition. That condition can be all kinds of things but typically fall into two camps: (1) the type of media that’s being used, and (2) a specific feature of the browser, device, or even the user’s environment. So, say we want to apply certain CSS styling to a printed document: @media print { .element

Read More

Fancy Image Decorations: Outlines and Complex Animations | CSS-Tricks

[ad_1] We’ve spent the last two articles in this three-part series playing with gradients to make really neat image decorations using nothing but the <img> element. In this third and final piece, we are going to explore more techniques using the CSS outline property. That might sound odd because we generally use outline to draw a simple line around an element — sorta like border but it can only draw

Read More

Holographic Trading Card Effect | CSS-Tricks

[ad_1] Simon Goellner (@simeydotme)’s collection of Holographic Trading Cards have captured our attention. Under the hood there is a suite of filter(), background-blend-mode(), mix-blend-mode(), and clip-path() combinations that have been painstakingly tweaked to reach the desired effect. I ended up using a little img { visibility: hidden; } in DevTools to get a better sense of each type of holographic effect. Josh Dance (@JoshDance) replied with a breakdown of the

Read More

Creating Animated, Clickable Cards With the :has() Relational Pseudo Class | CSS-Tricks

[ad_1] The CSS :has() pseudo class is rolling out in many browsers with Chrome and Safari already fully supporting it. It’s often referred to it as “the parent selector” — as in, we can select style a parent element from a child selector — but there is so much more that :has() can help us solve. One of those things is re-inventing the clickable card pattern many of us love

Read More

Is There Too Much CSS Now? | CSS-Tricks

[ad_1] As front-end developers, we’ve wished for a lot of things over the years — ways to center things in CSS, encapsulate styles, set an element’s aspect ratio, get finer-grained control over our colors, select an element based on its children’s properties, manage layers of specificity, allow elements to respond to the width of their parents… the list goes on and on. And now that we got all we wished

Read More

Pure CSS Bezier Curve Motion Paths | CSS-Tricks

[ad_1] Are you a Bezier curve lover like I am? CodePen Embed Fallback Besides being elegant, Bezier curves have nice mathematical properties due to their definition and construction. No wonder they are widely used in so many areas: As a drawing/design tool: They are often refered to as “paths” in vector drawing software. As a format of representing curves: They are used in SVG, fonts and many other vector graphic

Read More

Instant Articles, Proprietary Syndication, and a Web Built on User Fidelity Preferences | CSS-Tricks

[ad_1] I love it when there’s a sense of synergy in the blogosphere. First, I caught Nick Heer’s coverage of Meta ending support for Instant Articles, its proprietary format for stripped-down performant news articles. He also compares it to the similar demise of AMP, Google’s answer to Instant Articles. Then I came across a new one from Chris Coyier where he goes on to discuss the big issue with proprietary

Read More

Fancy Image Decorations: Masks and Advanced Hover Effects | CSS-Tricks

[ad_1] Welcome to Part 2 of this three-part series! We are still decorating images without any extra elements and pseudo-elements. I hope you already took the time to digest Part 1 because we will continue working with a lot of gradients to create awesome visual effects. We are also going to introduce the CSS mask property for more complex decorations and hover effects. Fancy Image Decorations series Single Element Magic

Read More

Responsive Animations for Every Screen Size and Device | CSS-Tricks

[ad_1] Before I career jumped into development, I did a bunch of motion graphics work in After Effects. But even with that background, I still found animating on the web pretty baffling. Video graphics are designed within a specific ratio and then exported out. Done! But there aren’t any “export settings” on the web. We just push the code out into the world and our animations have to adapt to

Read More