Search
CSS Gradient Text
15.7.2019
Web developers know the fight we’ve all had to improve fonts on the web. Whether it be load time, odd strategies for using custom fonts (Cufon, anyone?), or just finding the right font itself, beautifying text on the web has never come easy. That got me thinking about fonts and CSS gradients, since...
Každé druhé nové auto v Norsku už je elektrické. Spalovací motor bude do šesti let zapovězen
5.7.2019
Norský silniční svaz se pochlubil statistikami prodejů nových automobilů v zemi za poslední půlrok a překvapil neutuchajícím zájmem Norů o elektromobily. Aktuálně je každé druhé prodané auto v Norsku elektrické, přesněji je podíl elektromobilů 48,4 %. Zbytek tvoří hybridy, případně automobily pouze
The Twelfth Fourth
4.7.2019
CSS-Tricks is 12 years old! Firmly into that Early Adolescence stage, I'd say ;) As we do each year, let's reflect upon the past year. I'd better have something to say, right? Otherwise, John Prine would get mad at me.
How the hell can a person go to work in the morning
And come home in...
Set Video Playback Speed with JavaScript
2.7.2019
I love that media has moved from custom plugins (Flash…gross) to basic HTML <video> and <audio> elements. Treating these media sources as just another element allows us to use CSS filters to adjust display, for example. The less we need to do with ffmpeg or plugins, the better. I’ve been...
Making width and flexible items play nice together
1.7.2019
The short answer: flex-shrink and flex-basis are probably what you’re lookin’ for.
The long answer
Let’s say you want to align an image and some text next to each other with like this:
Now let's say you reach for flexbox to make it happen. Setting the parent element to display: flex; is a good...
Fix Touch Bar Volume Buttons
30.6.2019
The touch bar on MacBooks has been a source of controversy since the beginning. Many mourned the loss of the escape key, while others refused to buy a new laptop to avoid the touch bar completely. I’ve not had many issues with the touch bar but mostly because I don’t really use it. One necessary...
Different Approaches for Creating a Staggered Animation
27.6.2019
Animating elements, at its most basic, is fairly straightforward. Define the keyframes. Name the animation. Call it on an element.
But sometimes we need something a little more complex to get the right “feel" for the way things move. For example, a sound equalizer might use the same animation...
Different Approaches for Creating a Staggered Animation
27.6.2019
Animating elements, at its most basic, is fairly straightforward. Define the keyframes. Name the animation. Call it on an element.
But sometimes we need something a little more complex to get the right “feel" for the way things move. For example, a sound equalizer might use the same animation...
How to Debug Remote Browsers
27.6.2019
It’s super frustrating when bugs pop up only in a remote browser. Something about that user, that device, or that environment is different, but I don’t know what! And of course, I can’t recreate it on my local development machine. The team at TrackJS came up with a cool way...
CSS :focus-within
25.6.2019
Using :hover to display additional information or elements is a very useful technique but a big drawback to using the hover pseudo-class is that they are usually not accessibility-friendly. Not everyone uses a mouse and some users have visual impairments, so they rely on screen readers or...
Nissan má bezemisní zmrzlinářské auto. Používá staré autobaterie
22.6.2019
Zmrzlinářské dodávky sice nepředstavují z globálního pohledu nijak zásadní riziko pro životní prostředí, přesto si právě je vybrala japonská automobilka Nissan pro demonstraci svých technologií. Koncept zmrzlinářského vozidla „Sky to Scoop“ chce ukázat, jak lze realizovat jejich provoz zcela bez
Checkout the Last Public Revision with Mercurial
19.6.2019
I’ve always preferred git over Mercurial (hg) because the feature branch workflow makes organizing code and working off of master very easy. You don’t get that with vanilla mercurial — instead, commits can just sort of apply on top of each other, without much organization....
Insurtech Platform to Apply Blockchain to Auto Claims With New Funding
18.6.2019
A new insurance platform built on blockchain and AI tech has received new funding to apply the technologies to fraud detection and streamlining claims
Test Sony KD-85ZG9: Špičkový 8K televizor, který můžete mít doma. Nebo si raději koupíte auto?
17.6.2019
Dva nové televizory řady ZG9 nově doplnily OLED televizory řady Master Class. Mají LCD obrazovky s úhlopříčkou 85“ a 98“, 8K rozlišení a slibují maximální kvalitu obrazu. A přesně tu dostanete
Uber to ani po smrtelné nehodě nevzdává. S Volvem představují nové a bezpečnější samořídicí auto
15.6.2019
Uber představil třetí generací svých autonomních vozů, kterou vyvinul ve spolupráci se švédskou automobilkou Volvo. Vůz, postavený na základech SUV XC90, bude přímo z výroby obsahovat veškeré samořídící technologie.
Výhodou nové koncepce má být především fakt, že odpadne složitá dodatečná
How to Detect Text in Images
11.6.2019
Images are a great way to communicate without text but oftentimes images are used/abused to spread text within social media and advertisements. Text in images also presents an accessibility issue. The truth is that it’s important, for any number of reasons, to be able to detect text in image...
Detect if Element is a Web Component
5.6.2019
I’ve advocated for web components since before they became a spec, mostly inspired by the Dojo Toolkit’s dijit framework. Empowering first class JavaScript widgets, as opposed to a mess of DIVs and templates, always made the most sense. Now that web components exist, and awesome...
Movin’ Modals Along a Path
4.6.2019
Modals always be just appearin'. You might see one once in a while that slides in from one of the edges, or uses some kind of scale/opacity thing to appear from "above" or "below." But we can get weirder than that. Why not have them come in on an offset-path?
Just a swoopy arc is kinda fun.
...
IP Geolocation API
4.6.2019
Detecting geolocation information from your user provides you a massive advantage: improved conversion, better segmenting and analytics, and providing more relevant content. There are numerous paid services which will provide geolocation info but they’re oftentimes too costly or short...
Prevent Page Scrolling When a Modal is Open
3.6.2019
Please stop me if you've heard this one before. You open a modal, scroll through it, close it, and wind up somewhere else on the page than you were when you opened the modal.
That's because modals are elements on a page just like any other. It may stay in place (assuming that's what it's meant...