Search

Nalezeno "css-tricks": 2941

Making a Realistic Glass Effect with SVG


I’m in love with SVG. Sure, the code can look dense and difficult at first, but you’ll see the beauty in the results when you get to know it. The bonus is that those results are in code, so it can be hooked up to a CMS. Your designers can rest easy knowing they don't have to reproduce an effect...

Register Now for An Event Apart 2019 in Chicago


(This is a sponsored post.) An Event Apart juuuuust wrapped up its Washington D.C. event yesterday. We hope we got to see you at the event but if not, perhaps we'll see you at the next one happening Aug. 28-28 in Chicago. Why would you go, you might ask? It's three days of experts imparting their...

Fetching Data in React using React Async


You’re probably used to fetching data in React using axios or fetch. The usual method of handling data fetching is to: Make the API call. Update state using the response if all goes as planned. Or, in cases where errors are encountered, an error message is displayed to the user. There will always...

Bringing CSS Grid to WordPress Layouts


December 6th, 2018 was a special date for WordPress: it marked the release of version 5.0 of the software that, to this day, powers more than one-third of the web. In the past, people working on the platform pointed out that there has never been any special meaning to version numbers used...

A More Accessible Portals Demo


The point of the <portal> element (behind a flag in Chrome Canary) is that you can preload another whole page (like <iframe>), but then have APIs to animate it to the current page. So "Single Page App"-like functionality (SPA), but natively. I think that's pretty cool. I'm a fan...

How much specificity do @rules have, like @keyframes and @media?


I got this question the other day. My first thought is: weird question! Specificity is about selectors, and at-rules are not selectors, so... irrelevant? To prove that, we can use the same selector inside and outside of an at-rule and see if it seems to affect specificity. body { background:...

Intrinsically Responsive CSS Grid with minmax() and min()


The most famous line of code to have come out of CSS grid so far is: grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); Without any media queries, that will set up a grid container that has a flexible number of columns. The columns will stretch a little, until there is enough room...

Creating Dynamic Routes in a Nuxt Application


In this post, we’ll be using an ecommerce store demo I built and deployed to Netlify to show how we can make dynamic routes for incoming data. It’s a fairly common use-case: you get data from an API, and you either don’t know exactly what that data might be, there’s a lot of it, or it might change....

The Simplest Way to Load CSS Asynchronously


Scott Jehl: One of the most impactful things we can do to improve page performance and resilience is to load CSS in a way that does not delay page rendering. That’s because by default, browsers will load external CSS synchronously—halting all page rendering while the CSS is downloaded...

Run useEffect Only Once


React has a built-in hook called useEffect. Hooks are used in function components. The Class component comparison to useEffect are the methods componentDidMount, componentDidUpdate, and componentWillUnmount. useEffect will run when the component renders, which might be more times than you think....

Lessons Learned from a Year of Testing the Web Platform


Mike Pennisi: The web-platform-tests project is a massive suite of tests (over one million in total) which verify that software (mostly web browsers) correctly implement web technologies. It’s as important as it is ambitious: the health of the web depends on a plurality of interoperable...

Getting design system customization just right


I had a little rant in me a few months ago about design systems: "Who Are Design Systems For?" My main point was that there are so many public and open source ones out there that choosing one can feel like choosing new furniture for your house. You just measure up what you need and what you like...

The Guardian digital design system


Here’s a fascinating look at The Guardian’s design system with a step-by-step breakdown of what's gone into it and what options are available to designers and developers. It shows us how the team treats colors, typography, layouts, and visual cues like rules and borders. I’ve been struggling...

Telling the Story of Graphic Design


Let me just frame this for you: we're going to take a piece of production UI from a Sketch file, break it down into pieces of information and then build it up into a story we tell our friends. Our friends might be hearing, or seeing, or touching the story so we are going to interpret and translate...

Datalist is for suggesting values without enforcing values


Have you ever had a form that needed to accept a short, arbitrary bit of text? Like a name or whatever. That's exactly what <input type="text"> is for. There are lots of different input types (and modes!), and picking the right one is a great idea. But this little story is about something...

My Favorite Netlify Features


👋 Hey folks! Silvestar pitched this post to us because he is genuinely enthusiastic about JAMstack and all of the opportunities it opens up for front-end development. We wanted to call that out because, although some of the points in here might come across as sponsored content and Netlify...

Responsive Iframes


Say you wanted to put the CSS-Tricks website in an <iframe>. You'd do that like this: <iframe src="https://css-tricks.com"></iframe> Without any other styling, you'd get a rectangle that is 300x150 pixels in size. That's not even in the User Agent stylesheet, it's just some...

How Google PageSpeed Works: Improve Your Score and Search Engine Ranking


In this article, we uncover how PageSpeed calculates it’s critical speed score. It’s no secret that speed has become a crucial factor in increasing revenue and lowering abandonment rates. Now that Google uses page speed as a ranking factor, many organizations have become laser-focused...

What I Like About Vue


Dave Rupert digs into some of his favorite Vue features and one particular issue that he has with React: I’ve come to realize one thing I don’t particularly like about React is jumping into a file, reading the top for the state, jumping to the bottom to find the render function, then following...

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