Search

Nalezeno "QR code": 1615

3 Approaches to Integrate React with Custom Elements


In my role as a web developer who sits at the intersection of design and code, I am drawn to Web Components because of their portability. It makes sense: custom elements are fully-functional HTML elements that work in all modern … The post 3 Approaches to Integrate React with Custom Elements...

Fighting Game Players Create Community-Wide Code Of Conduct


Members of the fighting game community recently unveiled a code of conduct for the competitive scene. Much like a similar (and, as of December 2020, disbanded) project in the Smash community, the document is a list of common-sense rules that includes a firm stance against several forms of abuse...

Dynamic, Conditional Imports


With ES Modules, you can natively import other JavaScript. Like confetti, duh: import confetti from 'https://cdn.skypack.dev/canvas-confetti'; confetti(); That import statement is just gonna run. There is a pattern to do it conditionally though. It’s like this: (async () … The post...

Fading in a Page on Load with CSS & JavaScript


Louis Lazaris demonstrates a very simple way of doing this. Hide the body (with JavaScript) right away with opacity: 0 Wait for all the JavaScript to execute Unhide the body by transitioning it back to opacity: 1 Like this: CodePen… The post Fading in a Page on Load with CSS &...

Two Issues Styling the Details Element and How to Solve Them


In the not-too-distant past, even basic accordion-like interactions required JavaScript event listeners or some CSS… trickery. And, depending on the solution used, editing the underlying HTML could get complicated. Now, the <details> and <summary> elements (which combine to form...

A (terrible?) way to do footnotes in HTML


Terence Eden poked around with a way to do footnotes using the <details>/<summary> elements. I think it’s kind of clever. Rather than a hyperlink that jumps down to explain the footnote elsewhere, the details are right there next … The post A (terrible?) way to...

Fixing Smooth Scrolling with Find-on-Page


Back when we released the v17 design (we’re on v18 now) of this site. I added html { scroll-behavior: smooth; } to the CSS. Right away, I got comments like this (just one example): … when you control+f or … The post Fixing Smooth Scrolling with Find-on-Page appeared first...

Building Flexible Components With Transparency


Good thinking from Paul Herbert on the Cloudfour blog about colorizing a component. You might look at a design comp and see a card component with a header background of #dddddd, content background of #ffffff, on an overall … The post Building Flexible Components With Transparency appeared...

Careful When Changing the Display of `summary`


I got a very helpful bug report the other day (thanks Kilian!) about the <details> element in a blog post of mine not showing the default ▶ icon, and thus looking rather like any ol’ random <p>. It … The post Careful When Changing the Display of `summary`...

`aspect-ratio` is going to deprecate FitVids


Jen was just tweetin’ about how the latest Safari Technical Preview has aspect-ratio. Looks like Chrome and Firefox both have it behind a flag, so with Safari joining the party, we’ll all have it soon. I played with it … The post `aspect-ratio` is going to deprecate FitVids...

Styling Code In and Out of Blocks


There is a <code> tag in HTML. I literally just used it to wrap that tag in the previous sentence — so meta. It is an inline-by-default element that denotes any sort of code. It has default (user agent) styles … The post Styling Code In and Out of Blocks appeared first...

A font-display setting for slow connections


Me, I really dislike FOUT. I like that it’s an option, because not displaying text quickly on the web is no good. I know font-display: swap; is popular because it’s good for performance, but that FOUT stuff pains me. Matt … The post A font-display setting for slow connections...

CSS Individual Transform Properties in Safari Technology Preview


The WebKit blog details how to use individual CSS Transform properties in the latest version of Safari Technology Preview. This brings the browser in line with the CSS Transforms Module Level 2 spec, which breaks out the translate(), … The post CSS Individual Transform Properties in Safari...

Design v18


I redesigned the site! I can never think about the word redesign without also thinking about realigning, from Cameron Moll’s seminal article. I did not start from nothing. This design wasn’t a blank design canvas and empty code … The post Design v18 appeared first...

Automatic Social Share Images


It’s a pretty low-effort thing to get a big fancy link preview on social media. Toss a handful of specific <meta> tags on a URL and you get a big image-title-description thing. Here’s Twitter’s version of an article on this … The post Automatic Social Share Images...

Simulating Drop Shadows with the CSS Paint API


Ask a hundred front-end developers, and most, if not all, of them will have used the box-shadow property in their careers. Shadows are enduringly popular, and can add an elegant, subtle effect if used properly. But shadows occupy a strange … The post Simulating Drop Shadows with the...

clipPath vs. mask


These things are so similar, I find it hard to keep them straight. This is a nice little explanation from viewBox (what a cool name and URL, I hope they keep it up). The big thing is that clipPath (the element in SVG, as well as clip-path in CSS) is vector and when it is applied, whatever you...

A Utility Class for Covering Elements


Big ol’ same to Michelle Barker here: Here’s something I find myself needing to do again and again in CSS: completely covering one element with another. It’s the same CSS every time: the first element (the one that needs to be covered) has position: relative applied to it....

Responsible, Conditional Loading


Over on the Polyplane blog (there’s no byline but presumably it’s Kilian Valkhof), there is a great article, Creating websites with prefers-reduced-data, about the prefers-reduced-data media query. No browser support yet, but eventually you can use it in CSS to make choices that reduce...

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