Pieces



Tim Berners-Lee Invented the World Wide Web. Now He Wants to Save It
This article profiles Tim Berners-Lee, the inventor of the World Wide Web, detailing his ongoing efforts to safeguard its original vision against contemporary challenges. Berners-Lee is actively involved in initiatives such as the Solid Protocol and his company, Inrupt, which aim to decentralize the internet, empower users with control over their data, and counter issues like misinformation, addictive algorithms, and the monopolistic tendencies of large tech platforms. The piece traces his history from the web's inception to his current battle to preserve an open and equitable digital future amidst phenomena like 'enshittification' and the rise of AI.

That Secret Service SIM farm story is bogus
This article debunks the Secret Service's claim that a recently discovered SIM farm represents a major national security or espionage threat. The author, Robert Graham, argues it is merely a normal criminal enterprise involved in sending spam and masking call origins. He criticizes major news outlets like the New York Times for uncritically repeating the government's narrative and quoting "experts" who he claims are part of government propaganda, rather than providing an accurate assessment of the situation. Graham explains that SIM farms are common and can be operated by individuals, not just state actors, and while they can sometimes overload cell towers, they do not pose the sophisticated threat suggested by official statements.

Palo Alto approves dark sky ordinance, sets earlier curfew
The Palo Alto City Council has approved a new dark sky ordinance, implementing stricter measures to reduce light pollution. Key provisions include an earlier curfew for outdoor lighting, shifting from midnight to 11 p.m., and a broader application of new lighting standards to both new and replacement fixtures. The ordinance mandates specific light brightness levels (0.1-foot candle), a maximum light temperature (2700 K), and requires lights not to cross property lines, with some exemptions for emergency services and certain low-voltage or motion sensor lights. Environmental advocates supported the stricter version, citing benefits for sleep, energy use, and wildlife, while some residents expressed concerns about enforcement, noncompliance, and potential impacts on safety, leading to neighborhood exemptions that caused dissent among council members.

Bortle scale
The Bortle dark-sky scale is a nine-level numeric scale developed by amateur astronomer John E. Bortle to measure the night sky's brightness and the observability of celestial objects. Published in Sky & Telescope magazine in February 2001, it helps skywatchers evaluate sites by characterizing the interference from light pollution, ranging from Class 1 (darkest skies) to Class 9 (inner-city skies). The scale describes visibility of celestial objects and light sources, corresponding to naked-eye limiting magnitude and sky quality meter measurements.


How Germany outfitted half a million balconies with solar panels
Germany has successfully implemented "balkonkraftwerk" (balcony solar) with over half a million installations, allowing apartment dwellers to easily generate their own electricity. This initiative is driven by simple plug-in technology, supportive government policies including simplified permitting and renter protections, and local subsidies. While providing modest energy and cost savings, these systems foster a sense of climate action and encourage greater awareness of energy consumption among users, contributing to Germany's clean energy goals.

The Story of DOGE, as Told by Federal Workers
WIRED spoke with more than 200 federal workers in dozens of agencies to learn what happened as the Department of Government Efficiency tore through their offices.

The Problem with Trump Accounts
This article critiques the 'Trump Account' savings program, which provides a $1,000 federal deposit for every newborn. While seemingly beneficial, it argues that the tax-advantaged structure disproportionately favors wealthier families who can make larger contributions, thereby exacerbating wealth inequality. The authors contrast it with 'Baby Bonds' as a more equitable alternative and advocate for better-targeted support to truly help low-income families build assets.

How to reintegrate over a million veterans? Groups in Ukraine are working on it
Many Ukrainian war veterans have physical and mental trauma, and struggle to return to civilian life. Here is a look at some groups trying to help ease them back into the community.

I Thought I Knew Silicon Valley. I Was Wrong
This article details the significant shift in Silicon Valley's political landscape, particularly the tech elite's unexpected alignment with Donald Trump. The author, reflecting on a career covering the industry, expresses disillusionment as tech leaders, once seen as idealists championing progressive values and innovation, increasingly prioritize self-interest and political expediency, aligning with an administration many previously opposed. It explores the reasons behind this pivot, including fears of political repercussions, regulatory challenges, and the transactional nature of the new political dynamic, concluding with a grim outlook on the industry's future and its impact on democracy and innovation.

AI-powered CRISPR promises faster gene therapies
Stanford Medicine researchers have developed CRISPR-GPT, an AI tool that accelerates gene-editing processes, drastically reducing timelines for drug development from years to months. This AI-powered system aims to enhance the development of lifesaving treatments by simplifying experimental design, data analysis, and troubleshooting. It also makes complex gene-editing tasks accessible to novice and experienced scientists, potentially expanding the pool of researchers in biotechnology and medicine. The tool leverages years of published data to optimize experimental design and predict off-target edits, ensuring ethical use through built-in safeguards.

It's Fun to Be a Board-Game Sociopath
This article delves into the author's enjoyment of deceptive and manipulative tactics in board games like Werewolf, Settlers of Catan, and Risk. The author, who admits to a "ruthless game persona," consults experts such as Shane Tilton, Tobias Otterbring, and Rachel Kowert. They explain that the thrill of deception in low-stakes game environments can be a form of "cheater's high" and may even help develop real-world social skills like persuasion and reading people, without negative repercussions. The piece also discusses how aspects of one's real personality can manifest in games and how in-game behavior can still influence real-life relationships, though people generally distinguish between game and reality.


The Uses and Abuses of “Antisemitism”
This article from The New Yorker reviews Mark Mazower's book "On Antisemitism," exploring the historical evolution of the term "antisemitism." It details how the concept shifted from a 19th-century politics of exclusion to a modern political tool, examining events like the Dreyfus Affair and the Holocaust. The piece discusses how Jewish identity and the relationship with Israel were shaped by these historical shifts, and analyzes the contemporary blurring of lines between anti-Zionism and antisemitism, particularly in the context of the Israeli-Palestinian conflict and global politics.

A Very, Very Expensive Way to Reduce Crime
This article from The Atlantic criticizes the Trump administration's use of National Guard deployments to reduce crime, arguing that the strategy is inefficient and incredibly expensive. It highlights the significant costs of deployments in Washington D.C. and Los Angeles, with potential for hundreds of millions more for other cities. The author points out that while some crime reduction has occurred, it's questioned whether the National Guard is the most effective or cost-efficient solution, especially given the administration's cuts to more targeted and proven crime-reduction programs like COPS, which provide funding for local law enforcement and community violence intervention.

The U.S. Government’s Extraordinary Pursuit of Kilmar Ábrego García
After a pair of federal judges in Tennessee had cleared the way for Kilmar Ábrego García to be released from pretrial detention, on August 22nd, so that he could spend a couple of days with his family before a scheduled check-in at an Immigration and Customs Enforcement office in Baltimore, he was taken directly to a nearby hotel. The first thing he did was change into a new set of clothes that his wife, Jennifer Vasquez, had bought for him. Then he was given some flowers and ushered into a small room where Vasquez, their three children, other relatives, and supporters were waiting. He picked up his youngest son as people chanted, “¡Sí, se pudo!”—something like “Yes, we did!” The child had been in a car with Ábrego García when ICE arrested him, near their home in Maryland, on March 12th. The arrest occurred during the government’s scramble to fly hundreds of people—mostly Venezuelans it claimed were members of the Tren de Aragua gang—to be incarcerated in El Salvador’s notorious CECOT prison, under the centuries-old Alien Enemies Act. (A federal appeals court in New Orleans has since ruled that President Donald Trump had improperly invoked the law.) Days later, Ábrego García, a Salvadoran native, was sent to CECOT on a plane with some of them, beginning one of the highest-profile campaigns of retribution against an individual person of Trump’s second term. On March 24th, lawyers for Ábrego García and his family filed a civil lawsuit demanding his return, and the courts quickly ruled that he had been deported in error. His entanglement with ICE had begun six years earlier, in March, 2019, when the Prince George’s County police department, in Maryland, arrested him and three other day laborers outside a Home Depot. (More recently, he has been employed as a sheet-metal worker.) He sought asylum and the right to not be refouled, or forcibly returned to a place where one is subject to persecution—in his case, to El Salvador. An immigration judge in Baltimore denied him the asylum request but granted him the latter, in a “withholding of removal,” which allowed him to work in the U.S. without risk of being sent back to his home country. The judge found that he had a “well-founded fear” of persecution there, on account of official corruption and a history of extortionist demands and death threats from a local gang, against both him and his family, who ran a pupusa business.


The old SF tech scene is dead. What it’s morphing into is sinister.
The article, "The old SF tech scene is dead. What it’s morphing into is sinister.", published by SFGATE and authored by Ariana Bindman, laments the transformation of San Francisco's tech landscape. It describes a shift from a "quaint" era of diverse, "mission-based" startups in the mid-2010s to a present dominated by ominous AI companies. The author highlights the pervasive, dystopian AI billboards, widespread layoffs in favor of AI investment, and the perceived indifference of tech executives to the societal and environmental consequences of their creations. The article concludes by expressing deep unease about this unsettling trajectory for San Francisco and the wider world, stating that the tech scene, once a source of absurdity, is now terrifying.

Lorem Ipsum – Generator, Origins, and Meaning
Generate Lorem Ipsum placeholder text for use in your graphic, print and web layouts, and discover plugins for your favorite writing, design and blogging tools. Explore the origins, history and meaning of the famous passage, and learn how Lorem Ipsum went from scrambled Latin passage to ubiqitous dummy text.

Winners of Ocean Photographer of the Year 2025
A showcase of the winning and commended images from the Ocean Photographer of the Year 2025 competition, presented by Oceanographic Magazine and Blancpain. The collection features exceptional coastal, drone, and underwater photographs selected from thousands of global entries, highlighting various aspects of marine life, conservation, and human interaction with the ocean.

The Last Americans Really Paying Taxes
Annie Lowrey's article, 'The Last Americans Really Paying Taxes,' critiques the evolving U.S. tax code under the Trump administration, highlighting how new legislation like the One Big Beautiful Bill Act (OBBBA) and the 2017 Tax Cuts and Jobs Act (TCJA) introduce carve-outs and loopholes. While these changes benefit the ultrarich and some working-class individuals through mechanisms like pass-through deductions, tip exclusions, and overtime tax breaks, they also complicate the system, reduce horizontal equity, and shrink the tax base. Lowrey argues that the professional-managerial class, who pay more predictable taxes, might become the sole group reliably contributing, leading to a less fair and potentially unstable fiscal future. The piece also touches on property tax revolts, regressive tariffs, and the IRS's struggles to enforce rapidly changing laws.

The Economy Is Turning Into a Black Box
Sophisticated private sources could provide a fuller picture of the state of the economy. But the government is not even trying to use them.

5 lessons from a house that generates more energy than it uses
This NPR article explores 5 lessons learned from the 'Green Idea House' in Hermosa Beach, California, a net-zero energy home that generates more power than it consumes. It details the challenges and benefits of sustainable remodeling, emphasizing self-power generation, thorough planning, adherence to the plan, adaptability to climate change, and the slow adoption rate of such innovative housing.


UUIDv7 Comes to PostgreSQL 18
This article discusses the introduction of native support for UUIDv7 in PostgreSQL 18, highlighting its benefits as a timestamp-based UUID variant that improves index locality and sortability compared to previous UUID versions. It explains why UUIDs are useful as primary keys in distributed databases, for unguessable public identifiers, and for allowing clients to generate identifiers without server coordination. The post also details how UUIDv7 addresses common concerns regarding UUIDs in databases, such as sorting and index locality, making it a significant enhancement for database design.

Understanding Zionism
This article explores Zionism as a nationalist movement, tracing its origins to the 1897 Basel congress led by Theodor Herzl. It delves into the early diversity of viewpoints within the movement, its pragmatic approach to establishing a Jewish homeland in Palestine, and its evolution through debates on statehood, religion, and the Palestinian Arab population. The author highlights Zionism's complex, multi-faceted nature, emphasizing its dynamic past and ongoing discussions about its future, including advocacy for Palestinian statehood.

Making XML human-readable without XSLT
This article by Jake Archibald explores alternatives to using XSLT for making XML human-readable in web browsers. It details XSLT's limitations, such as its outdated nature, low adoption, and security risks, which are prompting major browser vendors to remove support. Archibald suggests server-side data transformation for improved accessibility and performance, or client-side JavaScript for dynamic rendering. The article provides examples of how to achieve XSLT-like results using modern web technologies and stresses the importance of generating proper HTML elements for semantic correctness and accessibility during XML transformation.

Give footnotes the boot
This article, titled "Give footnotes the boot," argues against the use of footnotes in both print and web media, asserting that they disrupt the reader's flow. It details the poor user experience of footnotes, particularly on the web where they often necessitate extensive scrolling and navigation. Author Jake Archibald proposes several alternatives for presenting supplementary content, such as using parentheses for brief asides, `<section role="note">` for more substantial notes, and `<details>` elements for expandable information. The aim is to provide additional context in a less intrusive and more accessible manner, enabling readers to easily engage with or bypass extra content without losing their position in the main text.

Israel and the U.S. Delivered a Blow to Iran. It Could Come Back Stronger.
This article details how Israel and the U.S. dealt significant blows to Iran's 'Axis of Resistance' in mid-2025, leading to the decimation of proxies like Hezbollah and Hamas, and the collapse of the Assad regime in Syria. Despite these major setbacks, the article argues that Iran's leadership, historically resilient and innovative in its adversarial strategies, is unlikely to abandon its core anti-U.S. and anti-Israel stance. The current period of 'peace' is presented as a temporary phase, with Iran expected to develop new, possibly more covert, methods to continue its campaign of harassment and destabilization in the region, rather than reassess its fundamental priorities.

The Problem With Lottery Housing
This article critiques the use of housing lotteries in major liberal cities as a method for allocating "affordable" housing. It argues that this system, while seemingly fair, creates "hidden markets" that are inefficient, reward bureaucratic navigation, and fail to address the fundamental problem of housing scarcity. The author suggests that demand for below-market-rate housing will always outstrip supply, and that lotteries distract from the need to expand overall housing supply to achieve widespread affordability.

YouTube Bends the Knee
This article discusses how major tech companies like YouTube, Meta, and X are settling lawsuits with Donald Trump over account suspensions, effectively bowing to political pressure. It highlights the financial settlements and the shift towards looser content moderation policies, arguing that these actions represent corporate cowardice and a capitulation to the "Trump era" ideology, where platforms prioritize profit and political expediency over responsible governance and content moderation.

Flushable wipes and Iran: Water treatment facility adds cyberattacks to worry list
Water treatment workers are grappling with a new and evolving threat: hackers burrowing into critical systems to wreak havoc. This article highlights the increasing frequency and severity of cyberattacks on U.S. water infrastructure, citing incidents involving Iranian hackers in Aliquippa, Pennsylvania, and concerns about Chinese state-affiliated groups like Volt Typhoon. It details the challenges faced by small towns with antiquated systems and limited resources, and introduces initiatives like Project Franklin that connect cybersecurity experts with water utility operators to protect vital infrastructure.

America Is on the Cusp of a Two-Tier Vaccine System
The article discusses how recent changes by the CDC's Advisory Committee on Immunization Practices (ACIP), influenced by new members appointed by Robert F. Kennedy Jr., are poised to create a two-tier vaccine system in America. These changes, including the removal of the joint MMRV vaccine from the childhood schedule and the combination shot from the Vaccines for Children (VFC) program, will disproportionately affect low-income children and those reliant on VFC for free vaccinations. The author argues that this could lead to increased vaccine inequality, mirroring historical health disparities, by creating more inconveniences and potentially limiting access for vulnerable populations.

New York NIMBYs Turn Against Democracy
This article discusses the struggle in New York City to address its housing shortage, specifically focusing on the City Council's attempts to block ballot measures designed to simplify the permitting process and increase housing development. It delves into the concept of "member deference," a discretionary power allowing individual legislators to halt housing proposals in their districts, and critiques how this undermines democratic processes. The piece provides historical context, tracing the evolution of urban planning and citizen participation from the mid-20th century pro-growth machines to the anti-growth mechanisms of today, highlighting how both can lead to dysfunction. It concludes by arguing that voters should have a say in development policies and notes a potential solution in rescheduling municipal elections to coincide with higher-turnout federal and state elections.


How Did Sports Betting Become Legal in the US?
Since 2018, the amount wagered on sports bets has grown exponentially in the US, with a significant percentage of college students and young men engaging in online sports betting. This article delves into the fascinating story of how sports betting became legal, involving four key figures: Bill Bradley, who introduced the PASPA ban in 1992; Chris Christie, the New Jersey governor who fought for its repeal; Jeremy Kudon, a lobbyist instrumental in legalizing fantasy sports and later sports betting across states; and Ted Olson, the constitutional lawyer who successfully argued for PASPA's unconstitutionality in the Supreme Court.
/**
CSS Extras - A collection of useful CSS custom functions
@author Sindre Sorhus
@license (MIT OR CC0-1.0)
*/
/* ===================================
Math & Number Functions
=================================== */
/**
Negates a value (returns the negative).
@param {Number} --value - The value to negate.
@returns {Number} The negated value.
@example padding: --negate(1em);
*/
@function --negate(--value) {
result: calc(-1 * var(--value));
}
/**
Linear interpolation between two values.
@param {Number} --from - Start value.
@param {Number} --to - End value.
@param {Number} --progress - Progress between 0 and 1.
@returns {Number} Interpolated value.
@example width: --lerp(100px, 200px, 0.5);
*/
@function --lerp(--from, --to, --progress) {
result: calc(var(--from) + (var(--to) - var(--from)) * var(--progress));
}
/**
Maps a value from one range to another.
@param {Number} --value - Input value.
@param {Number} --in-min - Input range minimum.
@param {Number} --in-max - Input range maximum.
@param {Number} --out-min - Output range minimum.
@param {Number} --out-max - Output range maximum.
@returns {Number} Mapped value.
@example font-size: --map-range(50vw, 320px, 1920px, 14px, 24px);
*/
@function --map-range(--value, --in-min, --in-max, --out-min, --out-max) {
--progress: clamp(0, calc((var(--value) - var(--in-min)) / (var(--in-max) - var(--in-min))), 1);
result: calc(var(--out-min) + (var(--out-max) - var(--out-min)) * var(--progress));
}
/**
Returns the ratio of two values. Supports values with different units, unlike regular division.
@param {CalcSum} --value - Input value.
@param {CalcSum} --to-value - Another input value.
@returns {Number} The ratio between two values.
@example scale: --ratio(16px, 1em);
*/
@function --ratio(--value, --to-value) {
result: tan(atan2(var(--value), var(--to-value)));
}
/* ===================================
Color Functions
=================================== */
/**
Returns a semi-transparent version of any color.
@param {Color} --color - The base color.
@param {Number} --opacity - Opacity value (0-100% or 0-1).
@returns {Color} Color with opacity.
@example background: --opacity(blue, 50%);
*/
@function --opacity(--color, --opacity) {
result: rgb(from var(--color) r g b / var(--opacity));
}
/**
Lightens a color by mixing with white.
Uses OKLab color space for perceptually uniform mixing.
@param {Color} --color - The base color.
@param {Number} --amount - Amount to lighten (0-100%).
@returns {Color} Lightened color.
@example background: --tint(blue, 20%);
*/
@function --tint(--color, --amount: 10%) {
result: color-mix(in oklab, var(--color), white var(--amount));
}
/**
Darkens a color by mixing with black.
Uses OKLab color space for perceptually uniform mixing.
@param {Color} --color - The base color.
@param {Number} --amount - Amount to darken (0-100%).
@returns {Color} Darkened color.
@example background: --shade(blue, 20%);
*/
@function --shade(--color, --amount: 10%) {
result: color-mix(in oklab, var(--color), black var(--amount));
}
/**
Adjusts color saturation.
Uses OKLCH color space for perceptually uniform chroma adjustment. Chroma is clamped to 0.4 for safe display.
@param {Color} --color - The base color.
@param {Number} --amount - Chroma multiplier.
@returns {Color} Adjusted color.
@example color: --saturate(red, 1.5);
*/
@function --saturate(--color, --amount: 1.2) {
result: oklch(from var(--color) l clamp(0, calc(c * var(--amount)), 0.4) h);
}
/**
Adjusts color lightness.
Uses OKLCH color space for perceptually uniform lightness adjustment. Maintains chroma independently.
@param {Color} --color - The base color.
@param {Number} --amount - Lightness adjustment (-100% to 100%).
@returns {Color} Adjusted color.
@example background: --lighten(blue, 20%);
*/
@function --lighten(--color, --amount: 10%) {
result: oklch(from var(--color) clamp(0, calc(l + var(--amount) / 100%), 1) c h);
}
/**
Darkens a color by reducing lightness.
Uses OKLCH color space for perceptually uniform lightness adjustment. Unlike `--shade()` which mixes with black, this directly reduces the lightness value.
@param {Color} --color - The base color.
@param {Number} --amount - Lightness reduction (0-100%).
@returns {Color} Darkened color.
@example background: --darken(blue, 20%);
*/
@function --darken(--color, --amount: 10%) {
result: oklch(from var(--color) clamp(0, calc(l - var(--amount) / 100%), 1) c h);
}
/**
Rotates the hue of a color.
Uses OKLCH color space for perceptually uniform hue rotation.
@param {Color} --color - The base color.
@param {Angle} --degrees - Degrees to rotate hue.
@returns {Color} Color with rotated hue.
@example background: --rotate-hue(blue, 180deg);
*/
@function --rotate-hue(--color, --degrees: 30deg) {
result: oklch(from var(--color) l c calc(h + var(--degrees)));
}
/**
Returns the complementary color.
Uses OKLCH color space for perceptually accurate complementary colors.
@param {Color} --color - The base color.
@returns {Color} Complementary color.
@example border-color: --complement(blue);
*/
@function --complement(--color) {
result: oklch(from var(--color) l c calc(h + 180deg));
}
/**
Inverts a color.
@param {Color} --color - The color to invert.
@returns {Color} Inverted color.
@example background: --invert(white);
*/
@function --invert(--color) {
result: rgb(from var(--color) calc(255 - r) calc(255 - g) calc(255 - b) / alpha);
}
/**
Converts a color to grayscale.
Uses OKLCH color space by setting chroma to 0.
@param {Color} --color - The color to convert.
@returns {Color} Grayscale color.
@example filter: --grayscale(var(--brand-color));
*/
@function --grayscale(--color) {
result: oklch(from var(--color) l 0 h);
}
/*
Uses HWB color space trick: converts to grayscale in OKLCH, then uses HWB's blackness/whiteness values amplified by a large multiplier to create a binary black/white decision based on brightness. This provides excellent contrast decisions without needing numeric luminance extraction.
*/
/**
Returns black or white text color for optimal contrast on a background.
@param {Color} --bg - Background color.
@returns {Color} Black or white for optimal readability.
@example color: --text-on(var(--bg-color));
*/
@function --text-on(--bg) {
result: hwb(from oklch(from var(--bg) l 0 0) h calc((b - 50) * 999) calc((w - 50) * 999));
}
/**
Removes transparency from a color, making it fully opaque.
@param {Color} --color - Color with alpha channel.
@returns {Color} Fully opaque version of the color.
@example background: --opaque(var(--semi-transparent-bg));
*/
@function --opaque(--color) {
result: rgb(from var(--color) r g b / 1);
}
/**
Mixes two colors in OKLab color space.
Uses perceptually uniform OKLab color space for natural-looking color mixing.
@param {Color} --color1 - First color.
@param {Color} --color2 - Second color.
@param {Number} --amount - Amount of second color to mix (0-100%).
@returns {Color} Mixed color.
@example background: --mix(red, blue, 30%);
*/
@function --mix(--color1, --color2, --amount: 50%) {
result: color-mix(in oklab, var(--color1), var(--color2) var(--amount));
}
/**
Returns a triadic color harmony.
Triadic colors are evenly spaced around the color wheel (120° apart).
@param {Color} --color - Base color.
@param {Number} --index - Which triadic color (1 or 2).
@returns {Color} Triadic color.
@example color: --triadic(blue, 1);
*/
@function --triadic(--color, --index: 1) {
result: oklch(from var(--color) l c calc(h + 120deg * var(--index)));
}
/**
Returns a tetradic (square) color harmony.
Tetradic colors are evenly spaced around the color wheel (90° apart).
@param {Color} --color - Base color.
@param {Number} --index - Which tetradic color (1, 2, or 3).
@returns {Color} Tetradic color.
@example color: --tetradic(blue, 2);
*/
@function --tetradic(--color, --index: 1) {
result: oklch(from var(--color) l c calc(h + 90deg * var(--index)));
}
/**
Creates a semi-transparent black.
@param {Number} --opacity - Opacity value (0-100% or 0-1).
@returns {Color} Semi-transparent black.
@example box-shadow: 0 2px 4px --black(20%);
*/
@function --black(--opacity: 50%) {
result: rgb(0 0 0 / var(--opacity));
}
/**
Creates a semi-transparent white.
@param {Number} --opacity - Opacity value (0-100% or 0-1).
@returns {Color} Semi-transparent white.
@example background: --white(90%);
*/
@function --white(--opacity: 50%) {
result: rgb(255 255 255 / var(--opacity));
}
/* ===================================
Typography Functions
=================================== */
/**
Creates fluid typography that scales with viewport.
NOTE: This function is mathematically equivalent to `--responsive-value()` but optimized for typography. Use this for `font-size`, `--responsive-value()` for other properties.
@param {Length} --min - Minimum font size.
@param {Length} --max - Maximum font size.
@param {Length} --min-viewport - Minimum viewport width.
@param {Length} --max-viewport - Maximum viewport width.
@returns {Length} Fluid font size.
@example font-size: --fluid-type(16px, 24px, 320px, 1280px);
*/
@function --fluid-type(--min, --max, --min-viewport: 320px, --max-viewport: 1280px) {
--slope: calc((var(--max) - var(--min)) / (var(--max-viewport) - var(--min-viewport)));
--intercept: calc(var(--min) - var(--slope) * var(--min-viewport));
result: clamp(var(--min), calc(var(--intercept) + var(--slope) * 100vw), var(--max));
}
/**
Creates a modular scale value.
@param {Number} --base - Base size.
@param {Number} --ratio - Scale ratio.
@param {Number} --step - Step in the scale.
@returns {Length} Scaled value.
@example font-size: --modular-scale(1rem, 1.25, 3);
*/
@function --modular-scale(--base: 1rem, --ratio: 1.25, --step: 0) {
result: calc(var(--base) * pow(var(--ratio), var(--step)));
}
/**
Calculates line height as a length value based on font size.
Returns a length (e.g., 24px) rather than a unitless ratio. Use this when you need an absolute line height value.
@param {Length} --font-size - The font size.
@param {Number} --multiplier - Line height multiplier.
@returns {Length} Line height as a length.
@example line-height: --line-height-length(16px, 1.6);
*/
@function --line-height-length(--font-size, --multiplier: 1.5) {
result: calc(var(--font-size) * var(--multiplier));
}
/**
Calculates line height as a unitless ratio.
Returns a number (e.g., 1.5) which is recommended for better inheritance in CSS.
@param {Length} --line-height - The desired line height as a length.
@param {Length} --font-size - The font size.
@returns {Number} Unitless line height ratio.
@example line-height: --line-height-ratio(24px, 16px);
*/
@function --line-height-ratio(--line-height, --font-size) {
result: calc(var(--line-height) / var(--font-size));
}
/**
Creates unitless line height from font size (recommended for better inheritance).
NOTE: Only works correctly with pixel font sizes. For rem/em values, use `--line-height-length()` or `--line-height-ratio()` instead.
@param {Length} --font-size - Font size in pixels.
@param {Number} --multiplier - Line height multiplier.
@returns {Number} Unitless line height.
@example line-height: --line-height-unitless(16px, 1.5);
*/
@function --line-height-unitless(--font-size: 16px, --multiplier: 1.5) {
result: calc(var(--font-size) * var(--multiplier) / 1px);
}
/* ===================================
Layout Functions
=================================== */
/**
Creates responsive sidebar layout columns.
@param {Length} --sidebar-width - Width of sidebar.
@param {Length} --content-min - Minimum width of content area.
@returns {Length} Grid template columns value.
@example grid-template-columns: --sidebar-layout(250px, 20ch);
*/
@function --sidebar-layout(--sidebar-width: 20ch, --content-min: 20ch) {
result: minmax(var(--sidebar-width), 1fr) minmax(var(--content-min), 3fr);
}
/**
Conditional border radius that removes at viewport edges.
@param {Length} --radius - Border radius value.
@param {Length} --edge-dist - Distance from viewport edge.
@returns {Length} Computed border radius.
@example border-radius: --conditional-radius(1rem, 8px);
*/
@function --conditional-radius(--radius, --edge-dist: 4px) {
/* Multiply by large number to amplify small differences, creating binary 0/radius effect */
result: clamp(0px, ((100vw - var(--edge-dist)) - 100%) * 1e5, var(--radius));
}
/**
Creates a responsive value that scales between two sizes.
NOTE: This function is mathematically equivalent to `--fluid-type()` but uses a simpler lerp-based approach. Use this for spacing/sizing, `--fluid-type()` for typography.
@param {Length} --small - Minimum value.
@param {Length} --large - Maximum value.
@param {Length} --viewport-min - Minimum viewport width.
@param {Length} --viewport-max - Maximum viewport width.
@returns {Length} Responsive value.
@example padding: --responsive-value(1rem, 2rem, 320px, 1200px);
*/
@function --responsive-value(--small, --large, --viewport-min: 320px, --viewport-max: 1200px) {
--progress: calc((100vw - var(--viewport-min)) / (var(--viewport-max) - var(--viewport-min)));
--clamped-progress: clamp(0, var(--progress), 1);
result: calc(var(--small) + (var(--large) - var(--small)) * var(--clamped-progress));
}
/**
Calculates height from aspect ratio and maximum constraints.
@param {Number} --ratio - Aspect ratio (e.g., 16/9).
@param {Length} --max-width - Maximum width.
@param {Length} --max-height - Maximum height.
@returns {Length} Computed height.
@example height: --aspect-height(16/9, 100vw, 100vh);
*/
@function --aspect-height(--ratio: 1, --max-width: 100%, --max-height: 100%) {
--computed-height: calc(var(--max-width) / var(--ratio));
result: min(var(--computed-height), var(--max-height));
}
/**
Calculates width from aspect ratio and maximum constraints.
@param {Number} --ratio - Aspect ratio (e.g., 16/9).
@param {Length} --max-height - Maximum height.
@param {Length} --max-width - Maximum width.
@returns {Length} Computed width.
@example width: --aspect-width(16/9, 100vh, 100vw);
*/
@function --aspect-width(--ratio: 1, --max-height: 100%, --max-width: 100%) {
--computed-width: calc(var(--max-height) * var(--ratio));
result: min(var(--computed-width), var(--max-width));
}
/* ===================================
Spacing Functions
=================================== */
/**
Creates consistent spacing based on a scale.
Recommended range: 0-10. Higher values create exponentially larger spacing.
@param {Number} --level - Spacing level (0-10).
@param {Length} --base - Base spacing unit.
@returns {Length} Computed spacing.
@example margin: --spacing(3);
*/
@function --spacing(--level: 1, --base: 0.25rem) {
result: calc(var(--base) * pow(2, var(--level)));
}
/**
Creates inset spacing for containers.
@param {Length} --padding - Base padding.
@param {Length} --max-width - Maximum container width.
@returns {Length} Responsive padding.
@example padding: --container-padding(2rem, 1200px);
*/
@function --container-padding(--padding: 1rem, --max-width: 1200px) {
--available: calc(100vw - var(--max-width));
--side-space: max(var(--padding), calc(var(--available) / 2));
result: var(--side-space);
}
/* ===================================
Animation Functions
=================================== */
/**
Creates a simple easing curve value.
@param {Number} --progress - Animation progress (0-1).
@returns {Number} Eased value.
@example transform: translateY(--ease-out(var(--progress)));
*/
@function --ease-out(--progress) {
--inverse: calc(1 - var(--progress));
result: calc(1 - var(--inverse) * var(--inverse));
}
/**
Creates elastic easing.
@param {Number} --progress - Animation progress (0-1).
@param {Number} --amplitude - Amplitude of elasticity.
@returns {Number} Eased value.
@example transform: scale(--elastic-ease(var(--progress), 1.2));
*/
@function --elastic-ease(--progress, --amplitude: 1) {
--p: calc(var(--progress) * 3.14159);
result: calc(var(--amplitude) * sin(var(--p) * 10) * exp(calc(-5 * var(--progress))));
}
/* ===================================
Utility Functions
=================================== */
/**
Converts pixels to rem.
@param {Length} --pixels - Pixel value.
@param {Length} --base - Base font size.
@returns {Length} Rem value.
@example font-size: --px-to-rem(24px);
*/
@function --px-to-rem(--pixels, --base: 16px) {
result: calc(var(--pixels) / var(--base) * 1rem);
}
/**
Converts rem to pixels.
@param {Length} --rems - Rem value.
@param {Length} --base - Base font size.
@returns {Length} Pixel value.
@example width: --rem-to-px(2rem);
*/
@function --rem-to-px(--rems, --base: 16px) {
result: calc(var(--rems) / 1rem * var(--base));
}
/* ===================================
Grid Functions
=================================== */
/**
Creates responsive grid columns.
@param {Number} --min-width - Minimum column width.
@param {Number} --max-cols - Maximum number of columns.
@returns {Grid} Grid template columns value.
@example grid-template-columns: --auto-grid(250px, 4);
*/
@function --auto-grid(--min-width: 250px, --max-cols: 4) {
result: repeat(
auto-fit,
minmax(max(var(--min-width), calc(100% / var(--max-cols))), 1fr)
);
}
/**
Creates a CSS grid span value.
Ensures the span is an integer value.
@param {Number} --columns - Number of columns to span.
@param {Number} --total - Total columns in grid.
@returns {Span} Grid column span (rounded to integer).
@example grid-column: --grid-span(3, 12);
*/
@function --grid-span(--columns: 1, --total: 12) {
result: span round(clamp(1, var(--columns), var(--total)));
}
/* ===================================
Filter Functions
=================================== */
/**
Creates a smooth shadow.
Generates three shadow layers. The spread-factor controls how distributed the shadows are.
@param {Color} --color - Shadow color.
@param {Length} --size - Shadow size.
@param {Number} --spread-factor - Controls shadow distribution (higher = tighter shadows).
@returns {Shadow} Layered box shadow.
@example box-shadow: --smooth-shadow(black, 20px, 3);
*/
@function --smooth-shadow(--color: rgb(0 0 0 / 0.2), --size: 12px, --spread-factor: 3) {
--step: calc(var(--size) / var(--spread-factor));
result:
0 var(--step) calc(var(--step) * 2) rgb(from var(--color) r g b / 0.25),
0 calc(var(--step) * 2) calc(var(--step) * 3) rgb(from var(--color) r g b / 0.18),
0 calc(var(--step) * 3) calc(var(--step) * 4) rgb(from var(--color) r g b / 0.12);
}
/**
Creates a glow effect.
@param {Color} --color - Glow color.
@param {Length} --size - Glow size.
@param {Number} --intensity - Glow intensity (0-1).
@returns {Shadow} Glow shadow.
@example box-shadow: --glow(cyan, 10px, 0.5);
*/
@function --glow(--color: white, --size: 10px, --intensity: 0.5) {
result: 0 0 var(--size) rgb(from var(--color) r g b / var(--intensity));
}
/* ===================================
Theme Functions
=================================== */
/**
Theme-aware value switcher for light/dark mode.
Uses CSS `if()` with color-scheme query. Requires `color-scheme: light dark` on `:root`.
Works with ANY value type (colors, lengths, etc.), not just colors.
> [!NOTE]
> CSS has a native [`light-dark()`](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark) function for colors. The custom `--light-dark()` function is more powerful as it works with any value type, not just colors.
@param {Any} --light - Value for light mode.
@param {Any} --dark - Value for dark mode.
@returns {Any} Theme-appropriate value.
@example color: --light-dark(black, white);
@example background-image: --light-dark(url(light.svg), url(dark.svg));
@example padding: --light-dark(0.75rem, 1rem);
*/
@function --light-dark(--light, --dark) {
result: if(color-scheme(dark): var(--dark); else: var(--light));
}
/**
Creates a theme-aware color with automatic adjustment.
Uses CSS `if()` with color-scheme query. Requires `color-scheme: light dark` on `:root`.
In light mode, mixes the base color with white (default 85% white).
In dark mode, mixes the base color with black (default 15% black).
@param {Color} --base - Base color.
@param {Number} --light-mix - Percentage of white to mix in light mode.
@param {Number} --dark-mix - Percentage of black to mix in dark mode.
@returns {Color} Theme-adjusted color.
@example background: --theme-color(blue, 80%, 20%);
*/
@function --theme-color(--base, --light-mix: 85%, --dark-mix: 15%) {
--light-result: color-mix(in oklab, white var(--light-mix), var(--base));
--dark-result: color-mix(in oklab, black var(--dark-mix), var(--base));
result: if(color-scheme(dark): var(--dark-result); else: var(--light-result));
}
Making semantic sidenotes without JavaScript
Sidenotes can enrich plain text by providing background information or jokes without cluttering the main article. While semantically similar to footnotes, their visual implementation on the web poses challenges. This article by Koos Looijesteijn presents a new and improved approach to creating semantic sidenotes using only HTML and CSS, without JavaScript.


Who Will Save the Dictionary?
The article discusses the existential crisis faced by dictionary publishers like Merriam-Webster and Dictionary.com in the digital age, detailing their struggles with declining revenue, technological shifts, and the impact of AI and search engines. Author Stefan Fatsis chronicles attempts by these institutions to adapt, from Merriam-Webster's hybrid online-print model and social media engagement to Dictionary.com's tumultuous journey through acquisitions and staffing cuts. Ultimately, it underscores the urgent need to preserve the role of authoritative dictionaries in an era of rapid linguistic evolution and distrust in traditional authorities.

Inside Uniqlo’s Quest for Global Dominance
This article explores Uniqlo's ambitious pursuit of global dominance in the apparel industry, detailing its 'LifeWear' philosophy, which champions timeless, functional, and democratic clothing designed to improve lives. It delves into the company's unique operational strategies, including its meticulous design process, integration of extensive customer feedback, and advanced manufacturing techniques. The piece also addresses the ongoing debate surrounding Uniqlo's sustainability claims and its efforts to overcome challenges in the American market and enhance its digital presence, ultimately questioning if its collectivist fashion approach can prevail over individualism.

The Debit-Card Rebellion
This article explores the ongoing shift in American consumer spending from credit cards to debit cards, driven by factors such as a historical struggle with credit card debt, legislative changes, and new financial products offering debit card rewards. Author Michael Waters highlights that broader economic conditions, high interest rates, and a cultural aversion to debt—particularly among younger generations—are encouraging greater reliance on debit cards as a tool for financial control. While credit cards still account for a significant portion of transactions, debit cards are increasingly seen as an off-ramp for consumers seeking to manage their spending and avoid accumulating debt.

How Do You Prove Your Citizenship?
This article explores the complexities U.S. citizens face in proving their citizenship to Immigration and Customs Enforcement (ICE) officers, challenging Justice Brett Kavanaugh's assertion that such verification is straightforward. It details how the Trump administration's aggressive immigration enforcement has led to the unlawful detention of citizens and legal residents, often based on ethnic appearance or language. The piece highlights the lack of a national database for quick citizenship verification and the unclear guidelines ICE officers operate under, emphasizing the "gray area" for American citizens not legally required to carry identification. Lawmakers are investigating these arrests and discriminatory practices.

Does the news reflect what we die from?
This article investigates the significant disconnect between the actual causes of death in the United States and their representation in news media. Utilizing data from the CDC and Media Cloud for 2023, the analysis reveals that while chronic conditions like heart disease and cancer account for over half of all deaths, they receive a disproportionately small amount of media coverage. Conversely, rare but dramatic events such as homicides and terrorism are vastly overrepresented in news reports across major outlets like The New York Times, The Washington Post, and Fox News. The authors argue that this media bias, driven by a preference for novel and emotive stories, distorts public perception of risks and societal problems, hindering an accurate understanding of mortality trends and public health progress.

How Wikipedia survives while the rest of the internet breaks
This article from The Verge details how Wikipedia, a vast compendium of human knowledge, navigates and survives constant threats to its neutrality and factual integrity. It explores the platform's unique self-governing mechanisms, including its "neutral point of view" policy and community-driven dispute resolution, which help it combat political attacks, state-sponsored misinformation campaigns, and internal editing conflicts. Despite being a frequent target for those seeking to inject bias, Wikipedia's stubborn adherence to verifiable sources and collaborative editing processes allows it to remain a crucial "factual foundation" in an internet increasingly awash in propaganda and AI-generated content.


This Is What the End of the Liberal World Order Looks Like
This article examines the devastating civil war in Sudan as a prime example of the collapse of the liberal world order, replaced by anarchy, greed, and transactional geopolitics. It details the immense civilian suffering, including violence, displacement, and starvation, exacerbated by the lack of effective international intervention and support. The conflict is fueled by a complex web of local factions like the Rapid Support Forces (RSF) and Sudanese Armed Forces (SAF), and international actors pursuing their own interests, particularly access to gold and regional influence. Despite the bleak situation, the article highlights the resilience of local Sudanese activists and volunteers who are working to provide mutual aid and maintain aspirations for democracy amidst widespread destruction and the withdrawal of global compassion.