承接 goodm4ven/tailwind-merge 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

goodm4ven/tailwind-merge

最新稳定版本:v1.1.2

Composer 安装命令:

composer require goodm4ven/tailwind-merge

包简介

Resolves TailwindCSS class conflicts in between Laravel Blade component calls

README 文档

README

بسم الله الرحمن الرحيم

Tailwind Merge

Latest Version on Packagist GitHub Tests Action Status Coverage Status Total Downloads

Dealing with TailwindCSS classes overriding can either be done with fighting important (!) classes, OR by using this package to remove the conflicting ones from the targetted component and keep the outside (passed) one instead.

Installation

Install the package with Composer:

composer require goodm4ven/tailwind-merge

Usage

It's all about the last-wins approach for consistency. Single string or multiple ones are around as arguments. You may also add them as an associative array to conditions!

  • Global helper function for PHP anywhere
twMerge('text-lg text-sm'); // results in "text-sm" twMerge('sm:text-lg', 'sm:text-3xl'); // results in "sm:text-3xl" twMerge([ 'sm:text-lg py-10 px-5' => true, 'sm:text-xl' => false, 'sm:text-3xl py-5', 'sm:text-sm' => true, ]); // results in "sm:text-sm px-5 py-5"
  • Resolve the merger directly (container or facade)
// Either app('tailwind-merge')->classes('last conflicting classes win'); // Or \GoodMaven\TailwindMerge\TailwindMerge::classes('last conflicting classes win');
  • Attribute bag macro inside Laravel Blade components
$attributes->twMerge('last conflicting classes win', 'then last conflicting classes win');
  • Blade directive for Blade views in general
@twMerge('last conflicting classes win')

Development

This package was initiated based on my Laravel package template that is built on top of Spatie's. Make sure to read the docs for both.

Support

Support ongoing package maintenance as well as the development of other projects through sponsorship or one-time donations if you prefer.

Credits


والحمد لله رب العالمين

统计信息

  • 总下载量: 81
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固