UX design
fromSmashing Magazine
3 days agoA Practical Guide To Design Principles - Smashing Magazine
Design principles align teams, inform decisions, and embody organizational values, serving as essential tools in the design process.
The dynamic type hints feature in Module Federation 2.0 dramatically streamlines the development process by automatically generating and loading types from remote modules, eliminating the need for shared type packages.
Google credits security researcher Shaheen Fazim with reporting the exploit to Google. The dude's LinkedIn says he's a professional bug hunter, and I'd say he deserves the highest possible bug bounty for finding something that a government agency is saying "in CSS in Google Chrome before 145.0.7632.75 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page."
Using such a resolution in the web browser would render a tiny illegible desktop site. To avoid that, CSS pixels add a layer of abstraction. Initially the amount of actual pixels compared to CSS pixels was simply a 2x or 3x conversion, but these days fractional scaling is also common.
Browser cache - Sometimes the browser is still loading the old CSS file. A hard refresh (Ctrl + F5) usually fixes it. Wrong file linked - Double-check if your HTML is actually linked to the correct CSS file. Specificity issues - Another CSS rule might be overriding your changes.
By how much? Well, that would depend on the value of the <length> argument provided. Thomas Walichiewicz, who proposed :near(), suggests that it works like this: button:near(3rem) { /* Pointer is within 3rem of the button */ } For those wondering, yes, we can use the Pythagorean theorem to measure the straight-line distance between two elements using JavaScript ("Euclidean distance" is the mathematical term), so I imagine that's what would be used behind the scenes here.
@keyframes animations can be named using strings, allowing syntax like @keyframes "@animation" { /* ... */ } with corresponding animation: "@animation" declarations. This capability has existed for 11 years across browsers, yet remains relatively unknown to many developers seeking alternative keyframe naming conventions beyond standard identifier formats.
Stacking contexts are incredibly useful, but they're also widely misunderstood and often mistakenly created, leading to a slew of layout issues that can be tricky to solve. Have you ever set z-index: 99999 on an element in your CSS, and it doesn't come out on top of other elements? A value that large should easily place that element visually on top of anything else, assuming all the different elements are set at either a lower value or not set at all.
Teams often use customer and user interchangeably until it breaks alignment. Here's how separating the two clarifies research, prioritization, and messaging across B2C, B2B, and B2B2C products.
Can you formulate the css code to apply the glassmorphism (GM) effect b/g to the tasks below: Glassmorphism code snippet background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.1); 1.1 Apply the GM effect to the Share B/G, Gallery B/G & Vid B/G icons during onmouseout. 1.2 Apply the GM effect to the Social icons pop-up panel B/G during onmousehover on the Share icon.
Support is limited to Chrome only because this technique uses recently released features, including corner-shape, sibling-index(), and unit division. In this article, we will explore another type of grid: a pyramidal one. We are still working with hexagon shapes, but a different organization of the elements. A demo worth a thousand words: For better visualization, open the full-page view of the demo to see the pyramidal structure. On screen resize, you get a responsive behavior where the bottom part starts to behave similarly to the grid we created in the previous article!
Anytime an exciting new web technology starts to land in browsers, developers want to know "when in the world am I going to be able to use this?" Currently, the finalized syntax for Grid Lanes is available in Safari Technology Preview. Edge, Chrome and Firefox have all made significant progress on their implementations, so it's going to arrive sooner than you think. Plus, you can start using it as soon as you want to with progressive enhancement.
Chris Coyier demonstrates how to maintain a video's state across different pages using CSS view transitions. He notes that this is fairly easy to do with same-page view transitions, but with multi-page view transitions you'll need to leverage JavaScript's pageswap event to save information about the video's state in sessionStorage as a JSON string (works with audio and iframes too), and then use that information to restore the state on pagereveal. Yes, there's a tiiiiny bit of audio stutter because we're technically faking it, but it's still super neat.
CSS Grid Lanes adds a whole new capability to CSS Grid. It lets you line up content in either columns or rows - and not both. This layout pattern allows content of various aspect ratios to pack together. No longer do you need to truncate content artificially to make it fit. Plus, the content that's earlier in the HTML gets grouped together towards the start of the container. If new items get lazy loaded, they appear at the end without reshuffling what's already on screen.