Search
Using @property for CSS Custom Properties
3.9.2020
Una Kravetz digs into how Chrome now allows you to declare CSS custom properties directly from CSS with more information than just a string.
So rather than something like this:
html {
--stop: 50%;
}
…can be declared with more details like this:
@property --stop {
syntax:...
Excluding Emojis From Transparent Text Clipping
2.9.2020
CSS-Tricks has this pretty cool way of styling hovered links. By default, the text is a fairly common blue. But hover of the links, and they’re filled with a linear gradient.
😍
Pretty neat, right? And the trick isn’t all that complicated. On hover…
give the link a linear...
Copy the Browser’s Native Focus Styles
28.8.2020
Remy documented this the other day. Firefox supports a Highlight keyword and both Chrome and Safari support a -webkit-focus-ring-color keyword. So if you, for example, have removed focus from something and want to put it back in the same style as the browser default, or want to apply a focus style...
Leading-Trim: The Future of Digital Typesetting
21.8.2020
leading-trim is a suggested new CSS property that lets us remove the extra spacing in every font so that we can more predictably style text. Ethan Wang has written about it — including how Microsoft has advocated for it — and that it’s now part of the Inline Layout Module Level 3 spec.
You’d use...
Writing Bitcoin Smart Contracts Is About to Get Easier With New Coding Language
13.8.2020
Bitcoin smart contracts are tricky. Minsc, a new language created by Bitcoin developer Nadav Ivgi, is making them easier to write
Practical Use Cases for JavaScript’s closest() Method
12.8.2020
Have you ever had the problem of finding the parent of a DOM node in JavaScript, but aren’t sure how many levels you have to traverse up to get to it? Let’s look at this HTML for instance:
<div data-id="123"<buttonClick me</button</div
That’s pretty straightforward, right? Say...
More Control Over CSS Borders With background-image
7.8.2020
You can make a typical CSS border dashed or dotted. For example:
.box {
border: 1px dashed black;
border: 3px dotted red;
}
You don’t have all that much control over how big or long the dashes or gaps are. And you certainly can’t give the dashes slants, fading, or animation!...
What does 100% mean in CSS?
7.8.2020
When using percentage values in CSS like this…
.element {
margin-top: 40%;
}
…what does that % value mean here? What is it a percentage of? There’ve been so many times when I’ll be using percentages and something weird happens. I typically shrug, change the value to something else...
TypeScript, Minus TypeScript
6.8.2020
Unless you’ve been hiding under a rock the last several years (and let’s face it, hiding under a rock sometimes feels like the right thing to do), you’ve probably heard of and likely used TypeScript. TypeScript is a syntactical superset of JavaScript that adds — as its name suggests — typing to...
SVG Title vs. HTML Title Attribute
30.7.2020
You know the title attribute? I can do this:
<div title="The Title"I'm a div with a `title`
</div
And now if I’m on a device with a mouse pointer and hover the cursor over that element, I get…
Which, uh, I guess is something. I sometimes use it for things like putting...
Getting the Most Out of Variable Fonts on Google Fonts
30.7.2020
I have spent the past several years working (alongside a bunch of super talented people) on a font family called Recursive Sans & Mono, and it just launched officially on Google Fonts!
Wanna try it out super fast? Here’s the embed code to use the full Recursive variable font family from Google...
Smart Contract Language DAML Is Now Available on R3's Corda
27.7.2020
R3’s widely-used open source blockchain platform Corda now supports the DAML smart contract language
Accordion Rows in CSS Grid
23.7.2020
I’d bet grid-template-columns is used about 10× more than grid-template-rows, but maybe everyone has just been missing out. Eric Meyer chucks a bunch of row lines onto his main site layout grid like this:
grid-template-rows: repeat(7, min-content) 1fr repeat(3, min-content);
That way, if...
Telecom Argentina S.A Hit by Major Ransomware Attack, Criminals Demand $7.5M Worth of Monero
21.7.2020
Telecom Argentina S.A has been hit by a ransomware attack and the cyber-criminals are demanding $7.5 million paid in the privacy coin monero. The Spanish language site, elperiodista.com quotes anonymous employees stating that the attack started last Wednesday. Initially thought to be a small...
Binding Arguments with Bind
20.7.2020
One of my favorite and most essential Function method is bind, a function we added to MooTools when it wasn’t featured in the JavaScript language itself. We often think of using bind to simply bind a method’s call to its host object, but did you know you can also bind arguments with...
Backdrop Filter effect with CSS
16.7.2020
I love these little posts where some tricky-looking design is solved by a single line of CSS using a little-known property. In this case, the design is a frosted glass effect and the CSS property is backdrop-filter.
The approach? Easy peasy:
.container {
backdrop-filter: blur(10px);
}
The...
This New Coding Language Could Help Unlock Bitcoin’s Smart Contract Potential
14.7.2020
With the introduction of Sapio, Jeremy Rubin hopes to expand Bitcoin's smart contract use cases and increase the "financial self-sovereignty" of its users
Bitcoin Script and Onchain Contracts: Two High-Level Programming Languages for Bitcoin Cash
11.7.2020
Last May, the software developer and creator of revoke.cash, Rosco Kalis, released Cashscript version 0.4 that included a number of optimizations. Cashscript’s new website highlights the high-level language that “offers a strong abstraction layer over Bitcoin Cash’ native virtual...
Responsive Styling Using Attribute Selectors
30.6.2020
One of the challenges we face when implementing class-based atomic styling is that it often depends on a specific breakpoint for context.
<div class="span-12"</div<!-- we want this for small screens --<div class="span-6"</div<!-- we want this for medium screens --<div...
Hide Scrollbars During an Animation
24.6.2020
CSS still can’t animate to auto dimensions.
.dropdown {
transition: 0.2s;
height: 0;
}
.dropdown.open {
/* the height will change, but it won't animate. */
height: auto;
}
There is JavaScript trickery you can try. Brandon Smith outlined several techniques here a little while back....