Search

Nalezeno "qr code": 1622

Click Once, Select All; Click Again, Select Normally


A bonafide CSS trick from Will Boyd! Force all the content of an element to be selected when clicked with user-select: all; If you click a second time, let the user select just parts of the text as normal. Second click? Well, it’s a trick. You’re really using a time-delayed...

How to Redirect a Search Form to a Site-Scoped Google Search


This is just a tiny little trick that might be helpful on a site where you don’t have the time or desire to build out a really good on-site search solution. Google.com itself can perform searches scoped to one particular site. The trick is getting people there using that special syntax...

@property


The @property is totally new to me, but I see it’s headed to Chrome, so I suppose it’s good to know about! There is a draft spec and an “intent to ship” document. The code from that document shows: @property --my-property { syntax: "<color"; initial-value: green; ...

SVG, Favicons, and All the Fun Things We Can Do With Them


Favicons are the little icons you see in your browser tab. They help you understand which site is which when you’re scanning through your browser’s bookmarks and open tabs. They’re a neat part of internet history that are capable of performing some cool tricks. One very new trick is the ability...

Different Approaches to Responsive CSS Motion Path


As a follow-up to Jhey’s recent post on responsive motion paths, Michelle Barker notes that another approach could be to just transform: scale() the whole dang element. The trade-off there is that you’re scaling both the path and the element on the path at the same time; Jhey’s...

Some Little Improvements to My VS Code Workflow (Workspaces, Icons, Tasks)


I did a little thing the other day that I didn’t know was possible until then. I had a project folder open in VS Code like I always do, and I added another different root folder to the window. I always assumed when you had a project open, it was one top level root folder and that’s...

My Visual Studio Code Setup: Extensions and Themes


Matthias Ott’s posted his VS Code setup. I find lists like this (I rounded up some recent updates of my own) irresistible, probably because, like y’all, I spend an awful lot of time in VS Code and wanna make sure I’m getting the most out of it. Things from the list that stood...

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...

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