Will Boyd digs into the user-select CSS property: CSS lets you control how text selection behaves and appears on your pages. This can help you improve usability in certain situations and add a little bit of visual flair. Let’s dive in! His posts includes a very nice hack to make user-select: all; work only at […]
The logic behind displaying an image responsively is complicated. It involves determining how large the image will be displayed, as well as understanding whether the user is on a high-resolution display, among other things. Thankfully, the browser is better equipped than we are to handle this logic. All we need to do is give it […]
Great tip by Mattias: TIL: you can fake package versions in composer using the "as" alias. Useful to force install certain versions while keeping other dependencies in check! 👍https://t.co/VzmMRCCoR5 — Mattias Geniar (@mattiasgeniar) April 16, 2020 You can alias directly when requiring a package: composer require monolog/monolog:”dev-bugfix as 1.0.x-dev” Surely comes in handy when locally […]
Christian Heilman: The input type colour supports the list attribute, which allows you to define a preset list of options. The colours need to be defined as hexadecimal colours. They can be defined as values or text inside the option tags, but the values take precedence. Pictured at the top of this post is how […]
Robin Rendle writing for CSS-Tricks, on leveraging Variable Fonts when implementing a Dark Mode: Oddly enough, these two bits of text [shown above] are actually using the same font-weight value of 400. But to my eye, the white text looks extra bold on a black background. How do we fix this? Well, this is where […]
98.css is a CSS library for building interfaces that look like Windows 98. 😂 98.css → UPDATE 2020.04.28: Jordan Scale, the author of the library, has done a write-up on 98.css.
The key property for the parallex effect itself is the perspective set on the .parallax-wrapper, in combination with the height and object-fit: cover; set on its containing img element. The shadow is injected using ::after ⚠️ Doesn’t seem to work in Safari …
Photo by Zach Lucero on Unsplash When presented with a problem, Nicholas C. Zakas has settled on a set of 5 questions he asks himself for each problem as it arises. Asking these questions, in order, helps him make the best decision possible: Is this really a problem? Does the problem need to be solved? […]