Search
Reklamace stručně a přehledně. Jak se vyhnout problémům a ochránit svá práva
22.2.2020
Footnote Characters
20.2.2020
They are special superset numbers that are sometimes perfect for footnotes. Here they are:
¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹
I generally prefer to superscript the number myself, like:
<pThis next word<sup1</suphas a footnote.</p
You'd probably add an anchor link around that as well to link to an...
Solving Sticky Hover States with @media (hover: hover)
18.2.2020
Mezo Istvan does a good job of covering the problem and a solution to it in a blog post on Medium¹.
If you tap on something that has a :hover state but you don't leave the page then, on a mobile device, there is a chance that :hover state "sticks." You'll see this with stuff like jump-links used...
Listen to your web pages
16.2.2020
A clever idea from Tom Hicks combining MutationObserver (which can "observe" changes to elements like when their attributes, text, or children change) and the Web Audio API for creating sounds. Plop this code into the console on a page where you'd like to listen to essentially any DOM change...
Toward Responsive Elements
12.2.2020
Hot news from Brian Kardell, regarding what we've been referring to as "container queries", the most hotly requested feature in CSS:
There does seem to be some general agreement on at least one part of what I am going to call instead "Responsive Design for Components" and that is that flipping...
The Hooks of React Router
12.2.2020
React Router 5 embraces the power of hooks and has introduced four different hooks to help with routing. You will find this article useful if you are looking for a quick primer on the new patterns of React Router. But before we look at hooks, we will start off with a new route rendering...
Select an Element with a Non-Empty Attribute
5.2.2020
Short answer:
[data-foo]:not([data-foo=""] {
Longer answer (same conclusion, just an explanation on why we might need this):
Say you have an element that you style with a special data-attribute:
<div data-highlight="product"</div
You want to target that element and do special things when...
Understanding Immutability in JavaScript
30.1.2020
If you haven’t worked with immutability in JavaScript before, you might find it easy to confuse it with assigning a variable to a new value, or reassignment. While it’s possible to reassign variables and values declared using let or var, you'll begin to run into issues when you try that with...
Resizing Values in Steps in CSS
30.1.2020
There actually is a steps() function in CSS, but it's only used for animation. You can't, for example, tell an element it's allowed to grow in height but only in steps of 10px. Maybe someday? I dunno. There would have to be some pretty clear use cases that something like background-repeat: space...
Bundling JavaScript for Performance: Best Practices
24.1.2020
Performance advice from David Calhoun on how many scripts to load on a page for best performance:
[...] some of your vendor dependencies probably change slower than others. react and react-dom probably change the slowest, and their versions are always paired together, so they...
What’s the Difference Between Width/Height in CSS and Width/Height HTML attributes?
24.1.2020
Some HTML elements accept width and height as attributes. Some do not. For example:
<!-- valid, works, is a good idea --<img width="500" height="400" src="..." alt="..."<iframe width="600" height="400" src="..."</iframe<svg width="20" height="20"</svg<!-- not valid...
Searching the Jamstack
22.1.2020
Here's Raymon Camden on adding site search functionality to a site that is statically hosted. A classic trick! Just shoot 'em to Google and scope the results to your site:
<form action="https://www.google.com/search" method="get"<input type="search" name="q"...
The Best Color Functions in CSS?
20.1.2020
I've said before that HSL is the best color format we have. Most of us aren't like David DeSandro, who can read hex codes. HSL(a) is Hue, Saturation, Lightness, and alpha, if we need it.
hsl(120, 100%, 40%)
Hue isn't intuitive, but it's not that weird. You take a trip around the color wheel from...
Currency ‘Cold War’ Takes Center Stage at Pre-Davos Crypto Confab
16.1.2020
Cryptocurrencies could be at the heart of a new Cold War, at least according to some investors at the Crypto Finance Conference in St. Moritz
Unnecessary Evil: How Government Regulations Kill Crypto Startups and Encourage Crime
16.1.2020
Thanks to the EU’s most recent money laundering directive, a small business called Post-a-coin, which sold cute postcards pre-loaded with tiny amounts of bitcoin, is being forced to shut down. Meanwhile, the most heinous criminals in history are continuing to facilitate violence, trafficking...
Liquid Cancells Pre-Sale of Non-Existent Telegram’s Token
16.1.2020
Telegram’s much-anticipated Gram token pre-sale has been canceled and all funds have been returned to investors, said Japan-based crypto exchange Liquid.
Elaborating on the reasons behind the cancellation, Liquid explained:
“At the time of the Gram Token Sale on Liquid, it was anticipated that...
A Web Component with Different HTML for Desktop and Mobile
16.1.2020
Christian Schaefer has a great big write-up about dealing with web advertisements. The whole thing is interesting, first documenting all the challenges that ads present, and then presenting modern solutions to each of them.
One code snippet that caught my eye was a simple way to design a component...
How many CSS properties are there?
15.1.2020
Tomasz Łakomy posted a joke tweet about naming all the CSS attributes and Tejas Kumar replied with a joke answer, going as far as making an npm module. You can even run a terminal command to see them:
npx get-all-css-properties
You'll get 259 of them. The source code uses the website quackit.com...
Netlify High-Fives
14.1.2020
We've got Netlify as a sponsor around here again this year, which is just fantastic. Big fan. Our own Sarah Drasner is Head of DX (Developer Experience) over there, if you hadn't heard. And if you haven't heard of Netlify, well, you're in for a treat. It's a web host, but for your jamstack sites...
Pre-Bitcoin Halving Race Pushes Mining Difficulty to Record High
14.1.2020
As Bitcoin (BTC) mining difficulty and hashrate are reaching new all-time highs, the Cryptoverse is discussing the meaning behind it, and it seems unlikely that the miners are capitulating ahead of the Bitcoin mining reward halving in May.
As reported by Cryptonews.com in October 2019, miners will...