以每小时 20 美元的价格聘请具备人工智能专业知识的 Laravel 开发人员。48 小时内即可开始工作。

Scrollbar Styling and Container Size Utilities in Tailwind CSS v4.3.0

发布日期 经过

Scrollbar Styling and Container Size Utilities in Tailwind CSS v4.3.0 image

Tailwind CSS v4.3.0 brings scrollbar styling utilities, container queries gain a way to read the container's own size, and the @variant directive becomes flexible enough to handle stacked and compound variants directly inside CSS.

  • Scrollbar width, color, and gutter utilities
  • 新的 @container-size utility for container query units
  • zoom-*tab-* utilities
  • @variant accepts stacked and compound variants
  • --default(…) support inside --value(…)--modifier(…)
Scrollbar color utilities in Tailwind CSS v4.3.0 shown in Tailwind Play
Scrollbar color utilities in Tailwind CSS v4.3.0 shown in Tailwind Play

什么是新的

Scrollbar Styling Utilities

Tailwind CSS v4.3.0 adds first-party utilities for styling scrollbars. You can control the width and color of scrollbars directly, plus reserve gutter space to prevent layout shift when scrollbars appear.

< div 班级 = "scrollbar-thin scrollbar-thumb-slate-500 scrollbar-track-slate-100 overflow-y-auto" >
<!-- content -->
</ div >
< div 班级 = "scrollbar-gutter-stable" >
<!-- reserves space so layout doesn't jump -->
</ div >

PR: #19981 , #20019 , #20018

@container-size 公用事业

Container queries shipped earlier in v4, and this release adds an @container-size utility that exposes the container's size for use inside the container. It pairs naturally with the existing @container utility for layouts that need to respond to their parent rather than the viewport.

公关稿: #18901

zoom-*tab-* 实用工具

Two more CSS properties get utility coverage in this release. zoom-* maps to the zoom property for scaling content without affecting layout flow, and tab-* controls tab-size for elements where preserved whitespace matters, like <pre> 块。

PR: #20020 , #20022

灵活的 @variant 句法

@variant directive now accepts the same stacked and compound variant syntax used in class names. That means you can write CSS that targets hover:focus (both at once) or hover, focus (either) without splitting it into multiple rules.

@variant hover:focus {
.my-component {
大纲 : 2 像素 solid currentColor ;
}
}
@variant hover, focus {
.my-component {
背景 : 我们的 --color-slate-100 (英文):
}
}

公关稿: #19996

--default(…) in Functional Utilities

When defining functional utilities with @utility , you can now reach for --default(…) 里面 --value(…)--modifier(…) to provide a fallback when no value is supplied. It makes custom utilities behave more like the built-in ones, which already gracefully handle the no-argument case.

公关稿: #19989

Canonicalization and Upgrade Fixes

The canonicalizer used by the upgrade tool got a round of fixes that matter if you run tailwindcss upgrade on existing projects. Significant underscore whitespace is preserved in arbitrary values, original units are kept instead of being normalized (so -mt-[20in] 变成 mt-[-20in] , 不是 mt-[-1920px] ), arbitrary :has() variants migrate to the shorthand has-[…] form, and inline style attributes are left alone instead of being rewritten into Tailwind classes.

参考

保罗·雷德蒙德照片

Laravel News 特约撰稿人。全栈 Web 开发人员兼作家。

立方体

Laravel 时事通讯

加入超过 4 万名开发者的行列,不错过任何新的技巧、教程等内容。

图像
SerpApi

适用于您的 LLM 和 AI 应用的 Web 搜索 API

访问 SerpApi
鱼叉:新一代时间跟踪和发票标志

Harpoon:新一代时间跟踪和发票系统

新一代时间跟踪和计费软件,帮助您的机构规划和预测盈利的未来。

Harpoon:新一代时间跟踪和发票系统
SaaSykit:Laravel SaaS 入门套件徽标

SaaSykit:Laravel SaaS 入门套件

SaaSykit 是一个多租户 Laravel SaaS 入门套件,包含运行现代 SaaS 所需的所有功能,例如支付、美观的结账界面、管理面板、用户仪表盘、身份验证、现成组件、统计数据、博客、文档等等。

SaaSykit:Laravel SaaS 入门套件
几天内即可获得 Laravel 代码审查徽标的专家指导

几天内即可获得 Laravel 代码审查方面的专家指导

专家级代码审查!两位拥有 10 年以上 Laravel 开发经验的开发者将为您提供清晰、实用的反馈,帮助团队构建更优质的应用程序。

几天内即可获得 Laravel 代码审查方面的专家指导
Shift 标志

转移

还在运行旧版本的 Laravel?立即实现 Laravel 自动升级和代码现代化,让您的应用程序保持最新状态。

转移
SerpApi logo

SerpApi

Access real-time search engine results through a simple API—no more scraping headaches! Use it for AI applications, SEO tools, product research, travel information, and more

SerpApi
Lucky Media 标志

幸运传媒

Get Lucky Now——拥有十余年经验的 Laravel 开发理想之选!

幸运传媒
PhpStorm 标志

PhpStorm

首选的 PHP IDE,对 Laravel 及其生态系统提供广泛的开箱即用支持。

PhpStorm
Tinkerwell 徽标

廷克威尔

Laravel 开发者必备的代码运行器。可在本地和生产环境中体验 AI、自动补全和即时反馈功能。

廷克威尔
Kirschbaum 标志

樱桃树

提供创新和稳定性,确保您的Web应用程序取得成功。

樱桃树
了解 Softtech 的标志

了解软科技

Acquaint Softtech 提供 AI 就绪的 Laravel 开发人员,48 小时内即可上手,每月费用为 3000 美元,没有冗长的销售流程,并提供 100% 退款保证。

了解软科技
Laravel Cloud 标志

Laravel 云

轻松创建和管理服务器,并在几秒钟内部署 Laravel 应用程序。

Laravel 云
DHH Joins Laravel Live Denmark 2026 for Fireside Chat with Taylor Otwell image

DHH Joins Laravel Live Denmark 2026 for Fireside Chat with Taylor Otwell

阅读文章
Model-Based Scheduling for Laravel with Cadence image

Model-Based Scheduling for Laravel with Cadence

阅读文章
Laravel's AI SDK adds sub-agents image

Laravel's AI SDK adds sub-agents

阅读文章
Laravel Introduces First-Party Passkey Authentication Support image

Laravel Introduces First-Party Passkey Authentication Support

阅读文章
Attach Addresses to Any Eloquent Model with Laravel Addressable image

Attach Addresses to Any Eloquent Model with Laravel Addressable

阅读文章
Generate Livewire Skeleton Placeholders Automatically with Wirebones image

Generate Livewire Skeleton Placeholders Automatically with Wirebones

阅读文章