Search

Nalezeno "QR code": 1615

Cool Little CSS Grid Tricks for Your Blog


I discovered CSS about a decade ago while trying to modify the look of a blog I had created. Pretty soon, I was able to code cool things with more mathematical and, therefore, easier-to-understand features like transforms. However, other areas of CSS, such as layout, have remained a constant source...

The Trickery it Takes to Create eBook-Like Text Columns


There’s some interesting CSS trickery in Jason Pamental’s latest Web Fonts & Typography News. Jason wanted to bring swipeable columns to his digital book experience on mobile. Which brings up an interesting question right away… how do you set full-width columns that...

How to Get All Custom Properties on a Page in JavaScript


We can use JavaScript to get the value of a CSS custom property. Robin wrote up a detailed explanation about this in Get a CSS Custom Property Value with JavaScript. To review, let’s say we’ve declared a single custom property on the HTML element: html {   --color-accent: #00eb9b; } In JavaScript...

Analyzing Notion app performance


Here’s a fantastic case study where Ivan Akulov looks at the rather popular writing app Notion and how the team might improve the performance in a variety of ways; through code splitting, removing unused vendor code, module concatenation, and deferring JavaScript execution. Not so long ago, we made...

A/B Testing Instant.Page With Netlify and Speedcurve


Instant.Page does one special thing to make sites faster: it preloads the next page when it’s pretty sure you’re going to click a link (either by hovering over 65ms or mousedown on desktop, or touchstart on mobile), so when you do complete the click (probably a few hundred milliseconds...

Adding CSS to a Page via HTTP Headers


Only Firefox supports it, but if you return a request with a header like this: Header add Link "<style.css;rel=stylesheet;media=all" …that will link to that stylesheet without you having to do it in the HTML. Louis Lazaris digs into it: […] the only thing I can think of that could...

On fixed elements and backgrounds


After just playing with apsect-ratio and being pleasantly surprised at how intuitive it is, here’s an example of CSS acting unintuitively: If you have a fixed element on your page, which means it doesn’t move when you scroll, you might realise that it no longer acts fixed if you apply a...

Chrome 83 Form Element Styles


There have been some aesthetic changes to what form elements look like as of Chrome 83. Anything with gradient colorization is gone (notably the extra-shiny <meter stuff). The consistency across the board is nice, particularly between inputs and textareas. Not a big fan of the new <select...

A New Way to Delay Keyframes Animations


If you’ve ever wanted to add a pause between each iteration of your CSS @keyframes animation, you’ve probably been frustrated to find there’s no built-in way to do it in CSS. Sure, we can delay the start of a set of @keyframes with animation-delay, but there’s no way to add time between...

Rotated Table Column Headers… Now With Fewer Magic Numbers!


Rotated <table> column headers is something that’s been covered before right here on CSS-Tricks, so shout-out to that for getting me started and helping me achieve this effect. As the article points out, if you aren’t using trigonometry to calculate your table styles, you’ll have to rely...

Overlapping Header with CSS Grid


Snook shows off a classic design with an oversized header up top, and a content area that is “pulled up” into that header area. My mind goes to the same place: Historically, I’ve done this with negative margins. The header has a height that adds a bunch of padding to the bottom...

China Passes Law Protecting Cryptocurrency Inheritance


China has passed the country’s long-awaited civil code which expands the scope of inheritance rights to include cryptocurrency, such as bitcoin. Inherited cryptocurrencies will be protected under the new law. Meanwhile, several Chinese courts have recently ruled that bitcoin and ethereum...

Global CSS options with custom properties


With a preprocessor, like Sass, building a logical “do this or don’t” setting is fairly straightforward: $option: false; @mixin doThing { @if $option { do-thing: yep; } } .el { @include doThing; } Can we do that in native CSS with custom properties? Mark Otto shows...

A First Look at `aspect-ratio`


Oh hey! A brand new property that affects how a box is sized! That’s a big deal. There are lots of ways already to make an aspect-ratio sized box (and I’d say this custom properties based solution is the best), but none of them are particularly intuitive and certainly not...

Background Patterns, Simplified by Conic Gradients


For those who have missed the big news, Firefox now supports conic gradients! Starting with Firefox 75, released on the April 7, we can go to about:config, look for the layout.css.conic-gradient.enabled flag and set its value to true (it’s false by default and all it takes to switch...

The Many Bad (and Good!) Patterns for Close Buttons


Manuel Matuzović details 10 bad HTML patterns for a close button. You know, stuff like this: <a class="close" onclick="close()"×</a Why is that bad? There is no href there, so it really isn’t a link (close buttons aren’t links). Not to mention the missing href makes this...

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