Search

Nalezeno "QR code": 1615

Fake Code


Here’s a fun little idea from Knut Synstad. You give it the URL of a GitHub Gist and it converts the Gist into grayscale rounded blobs (SVG) that sorta look like code if you squint. Maybe fun for interesting dynamic backgrounds or for whatever you might use code-looking stock art for. It...

Constrained CSS grids without `max-width`


Ain’t nothing wrong with max-width, but Ethan makes a point in the last sentence: Rather than simply defaulting to max-width as a constraint, I can use the empty space around my design, and treat it as a layout tool. If the space “around” your grid...

Pseudo-Randomly Adding Illustrations with CSS


Between each post of Eric Meyer’s blog there’s this rather lovely illustration that can randomly be one of these five options: Eric made each illustration into a separate background image then switches out that image with the nth-of-type CSS property, like this: .entry:nth-of-type(2n+1)::before...

Better Form Inputs for Better Mobile User Experiences


Here’s one simple, practical way to make apps perform better on mobile devices: always configure HTML input fields with the correct type, inputmode, and autocomplete attributes. While these three attributes are often discussed in isolation, they make the most sense in the context of mobile user...

CSS Scrollbar With Progress Meter


Scrollbars are natural progress meters. How far the scrollbar is down or across is how much progress has been made scrolling through that element (often the entire page). But, they are more like progress indicators than meters, if you think of a meter as something that “fills up” as...

Create a Responsive CSS Motion Path? Sure We Can!


There was a discussion recently on the Animation at Work Slack: how could you make a CSS motion path responsive? What techniques would be work? This got me thinking. A CSS motion path allows us to animate elements along custom user-defined paths. Those paths follow the same structure as SVG paths....

How the Vue Composition API Replaces Vue Mixins


Looking to share code between your Vue components? If you’re familiar with Vue 2, you’ve probably used a mixin for this purpose. But the new Composition API, which is available now as a plugin for Vue 2 and an upcoming feature of Vue 3, provides a much better solution. In this article...

Using CSS to Set Text Inside a Circle


You want to set some text inside the shape of a circle with HTML and CSS? That’s crazy talk, right? Not really! Thanks to shape-outside and some pure CSS trickery it is possible to do exactly that.  However, this can be a fiddly layout option. We have to take lots of different things into...

No-Class CSS Frameworks


I linked up Water.css not long ago as an interesting sort of CSS framework. No classes. No <h2 class="is-title">. You just use semantic HTML and get styles. Is that going to “scale” very far? Probably not, but it sure is handy for styling things quickly, where — of course...

Styling in the Shadow DOM With CSS Shadow Parts 


Safari 13.1 just shipped support for CSS Shadow Parts. That means the ::part() selector is now supported in Chrome, Edge, Opera, Safari, and Firefox. We’ll see why it’s useful, but first a recap on shadow DOM encapsulation… The benefits of shadow DOM encapsulation I work at giffgaff where we have...

When debugging, your attitude matters


Julia Evans: I was debugging some CSS last week, and I think that post is missing something important: your attitude. Now – I’m not a very good CSS developer yet. I’ve never written CSS professionally and I don’t understand a lot of basic CSS concepts (I think I finally understood for the first...

Thinking in Behaviors, Not Screen Sizes


Chase McCoy wrote a nifty post about the “gap problem” when making a grid of items. His argument might be summarized like this: how should we space elements with margins in CSS? He notes that the gap property isn’t quite ready for prime time when it comes to using it with flexbox, like this: .grid...

Tips for Writing Animation Code Efficiently


I’ve been coding web animations and helping others do the same for years now. However, I have yet to see a concise list of tips focused on how to efficiently build animations, so here you go! I will be using the GreenSock Animation Platform (GSAP). It provides a simple, readable API and solves...

Create Diagonal Layouts Like it’s 2020


Nils Binder covers the ways: 1. Use an SVG in the form of a triangle. This technique is nicely described by Erik Kennedy on CSS-Tricks. 2. Hide part of your section using clip-path. Read Diagonal Containers in CSS by Sebastiano Guerriero or Sloped edges with consistent angle...

CSS Findings From The New Facebook Design


Ahmad Shadeed digs around the new Facebook’s front-end code. One that stood out to me: .element { inset: 4px 0; /* Which is equivalent to: top: 4px, bottom: 4px, left: 0, right: 0 */ } Whaaat? This is the first I’ve heard of the inset property. Ahmad said he saw it working...

Continuous Deployments for WordPress Using GitHub Actions


Continuous Integration (CI) workflows are considered a best practice these days. As in, you work with your version control system (Git), and as you do, CI is doing work for you like running tests, sending notifications, and deploying code. That last part is called Continuous Deployment (CD)....

CSS-Only Marquee Effect


You make sure the text is more than twice the width of the screen, then use negative translate animations to do the marquee movement. You’ll probably want to aria-hidden all but one of them if you need to duplicate the text. Or, you could use a very clever CSS trick...

Accessibility Links


Austin Gil has kicked off the first in a five-part series about “HTML Forms Right” and to starts with semantics. It’s talking to the “we build our front-ends with JavaScript” crowd. The first block of code is an example of an Ajax form submission where the data...

Rethinking Code Comments


Justin Duke asks if treating code comments like footnotes could help us understand the code in a file better. In his mockup, all the comments are hidden by default and require a click to reveal: What a neat idea! Justin’s design reminds me of the way that Instapaper treated inline...

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