最新文章

今日新增 430 篇 · 共 7,327 篇 · 来自 241 个博客

Sara Soueidan··Sara Soueidan

Making SVGs Responsive With CSS

An article on how to make embedded SVGs cross-browser responsive. We're going to cover embedding techniques, how to apply the "Padding Hack" and how to use inline media queries to make SVGs adaptive.

Fabien Sanglard·

Let's compile like it's 1992

I have been tinkering with the vanilla source code of Wolfenstein 3D from 1992. Even though it is more than 20 years old: It still compile and here is how to do it (with plenty of screenshots).

Fabien Sanglard·

Game Engine Black Books

I am almost done with the first volume of what I hope will become a serie called "Game Engine Black Book". Each book would take further what I tried to do with my articles: Explain simply, yet in great details, a legendary game engine. For

Elixir Blog··José Valim

Elixir v0.15.0 released

Elixir v0.15.0 introduces Elixir's Logger, Mix aliases and is the last stop before Elixir v1.0. We are also glad to welcome Alexei into our team.

Sara Soueidan··Sara Soueidan

Understanding SVG Coordinate Systems and Transformations (Part 3) — Establishing New Viewports

AI 摘要This article, the third in a series on SVG coordinate systems and transformations, explains how to establish new viewports and user coordinate systems by nesting elements (or using elements like ). It demonstrates that nested SVGs, each with their own viewBox and preserveAspectRatio attributes, allow individual parts of a graphic to respond independently to viewport resizing, making elements flexible or fluid without distorting them. The concepts are illustrated through an example of a cracked egg graphic whose upper shell lifts to reveal a chicken as the screen shrinks.

Sara Soueidan··Sara Soueidan

Understanding SVG Coordinate Systems and Transformations (Part 2) — The transform Attribute

AI 摘要This article, the second in a series on SVG coordinate systems and transformations, explains the SVG transform attribute and its transformation functions—matrix, translate, scale, skewX/skewY, and rotate—including their syntaxes and how they differ from their CSS counterparts. It emphasizes that applying the transform attribute establishes a new user coordinate system (a copy of the current user space) on the element, so transformations affect the element's entire coordinate system and may reposition it within the viewport. While similar in many ways to CSS transformations on HTML elements, SVG transformations differ mainly in how and where the coordinate system is established and transformed.

Lea Verou··Lea Verou

An easy notation for grayscale colors

AI 摘要The CSS Working Group is debating how to name a new function for creating grayscale colors (with optional transparency), and the author is soliciting feedback on four competing proposals: gray(), white(), black(), and a one-argument shorthand for rgb()/rgba(). Each proposal has different trade-offs regarding intuitiveness, such as whether 100% means white or black and how alpha transparency is handled. The author also provides SCSS code to emulate the functions so developers can experiment before voting, though the rgb()/rgba() shorthand approach cannot be polyfilled.

Lea Verou··Lea Verou

Image comparison slider with pure CSS

AI 摘要The author, while writing the O'Reilly book 'CSS Secrets', demonstrates a Before/After image comparison slider built with pure CSS by using the underused resize property on a div overlaid on an image, requiring no JavaScript and offering more semantic markup than earlier scripted solutions. Drawbacks include limited keyboard accessibility, dragging only from the bottom-right corner, and lack of mobile support. A similar alternative approach uses a separate textarea element stretched via a scaleY() transform to achieve a full-height resizer, though it requires hardcoding the image dimensions in the CSS.

Sara Soueidan··Sara Soueidan

Understanding SVG Coordinate Systems and Transformations (Part 1) — The viewport, viewBox, and preserveAspectRatio

AI 摘要This article, the first in a three-part series, explains the fundamentals of SVG coordinate systems and transformations, focusing on the viewport, viewBox, and preserveAspectRatio attributes. It clarifies that the SVG canvas is conceptually infinite while only the viewport region is visible, and shows how width and height establish the initial viewport coordinate system. The article also demonstrates how the viewBox attribute lets you define a custom user coordinate system that effectively crops and scales the graphic to fill the viewport, with preserveAspectRatio becoming relevant when the aspect ratios of the two systems differ.

Sara Soueidan··Sara Soueidan

Clipping in CSS and SVG — The clip-path Property and <clipPath> Element

AI 摘要This article is a comprehensive guide to clipping in CSS and SVG, explaining how the clip-path property and the SVG element can be used to hide parts of elements within custom non-rectangular shapes. It covers using basic shape functions (polygon(), circle(), ellipse(), inset()), referencing SVG clip paths including paths made from text or multiple shapes, and applying clipping to both HTML and SVG elements. It also explains how to specify a reference box for basic-shape clip paths and notes that browser support for these features was still limited at the time of writing.

Sara Soueidan··Sara Soueidan

Structuring, Grouping, and Referencing in SVG — The<g>, <use>, <defs> and <symbol> Elements

AI 摘要This article explains how SVG provides elements for structuring, grouping, and referencing graphics: the element logically groups related elements so styles, transformations, and interactivity can be applied to them collectively, while allows reusing existing elements similar to copy-paste. It also covers the element, which defines elements (like gradients, masks, or groups) without rendering them so they can serve as templates referenced later, addressing drawbacks of such as relative positioning and non-overridable styles. Throughout, the article highlights the differences, advantages, and use cases of each element with practical examples like grouping and reusing an SVG bird illustration.

Andrew Kelley·

Turn Your Raspberry Pi into a Music Player Server

AI 摘要This article is a step-by-step tutorial for turning a Raspberry Pi into a music player server running Groove Basin, an open-source music player server with a web-based client that allows remote control and streaming. The author cautions that the Raspberry Pi is overhyped and recommends alternatives like the Beagle Bone Black, but proceeds to guide readers through installing Raspbian, setting up SSH access, and compiling dependencies such as SDL2, libav, and libebur128. Because some compilations take many hours on the Pi's limited hardware, the guide suggests running lengthy build steps in parallel or overnight.

Elixir Blog··José Valim

Elixir v0.14.0 released

Elixir v0.14.0 is released and expands the work on structs and bringing more of OTP right into Elixir and Mix.

Andrew Kelley·

Laptop Review - Bonobo Extreme

AI 摘要The author reviews the Bonobo Extreme laptop with Ubuntu pre-installed, praising its powerful performance, out-of-the-box driver support, and surprisingly good battery life for a heavy machine. However, they criticize numerous flaws, including dead pixels, periodic hardware failures, an awkward keyboard layout, and touchpad issues. The reviewer concludes that while guaranteed Linux compatibility is valuable, the laptop is overpriced and a machine with better quality assurance would be a smarter purchase.

Fabien Sanglard·

Trespasser: Jurassic Park CG Source Code Review

AI 摘要Jurassic Park: Trespasser, released in October 1998 after a three-year development cycle, was panned by critics yet achieved cult status thanks to a dedicated fan community that produced patches, tools, and even a remake. From a technology standpoint, its engine was a milestone in real-time CG, demonstrating that physics and outdoor environments were possible. The author found that the game's C++ code reflected its final result: genius and talent ultimately impaired by ambition and its resulting complexity.

Sara Soueidan··Sara Soueidan

Moving Forward With CSS Shapes

Following up with the CSS Shapes 101 article, I share a list of great resources to learn more about CSS Shapes, including tutorials, examples, and developer tools.

Sara Soueidan··Sara Soueidan

CSS Shapes 101

AI 摘要This article is a beginner's guide to CSS Shapes, teaching everything needed to start using them today. It covers the prerequisites, such as establishing a coordinate system and the conditions for elements to be eligible for shapes, before explaining the relevant properties, their values, and how each one affects the shape created. The article includes many visual explanations and examples throughout.

Andrew Kelley·

My Quest to Build the Ultimate Music Player

AI 摘要The author chronicles their multi-year quest to build the ultimate music player, motivated by a deep love for Amarok 1.4 and its shortcomings, particularly its flawed ReplayGain plugin and lack of built-in loudness compensation, which they explain in detail including challenges like clipping and pre-gain. They lay out a feature wishlist covering loudness compensation with cached scanning, ignoring unreliable duration tags, gapless playback, robust codec support, remote streaming, and a web-based shared jukebox interface inspired by a college project called 'PartyBeat.' The article concludes with their early technology experiments, including tinkering with Qt and Phonon before discovering Music Player Daemon.