Overridable class strategy
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 52/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- css, javascript, tailwindcss
- 领域
- frontend
调研方向
Start in src/index.js around line 353, where the class strategy is registered, and review the related strategy declarations. Change the class strategy's layer as requested, then verify the generated styles remain available while allowing later form styling to override them.
由索引模型根据 Issue 内容生成。
描述
What version of @tailwindcss/forms are you using?
v0.5.7
Describe your issue
I read the discussion https://github.com/tailwindlabs/tailwindcss-forms/issues/22. The thread has been closed by adding class strategy.
Sorry to bring this up again
However, the class strategy is not easily overridable because it was placed later in the CSS file (at the components layer).
No matter the strategy used, tailwindcss-forms should always be a base, ready to be overridden by other stylings.
Why the need for overrides?
I can't talk for others, as you'll see some of them on the discussion links above, but for me, tailwindcss-forms adds colors that almost always need overriding because they stand out like sore thumbs.
What should we do?
Can we move CSS declarations of class strategy from components layer to base layer?
Basically, modify the code here:
https://github.com/tailwindlabs/tailwindcss-forms/blob/c9d9da3e010b194a1f0e9c36fbd98c83e4762840/src/index.js#L353
from addComponents to addBase.
Why do I, or other similar people, use tailwindcss-forms at all?
tailwindcss has its ecosystem, and some 3rd-party components expect tailwindcss-forms to be there as the base. We still want to work with tailwindcss-forms and the people creating those components, even if we are not a fan of the approaches.
- 主要语言
- HTML
- 星标
- 4.6k
- 派生
- 230
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tailwindlabs/tailwindcss-forms 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
tailwindlabs/tailwindcss-forms#184 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
tailwindlabs/tailwindcss-forms#74 · 9 条评论 · 11 个 reaction ·
查看 tailwindlabs/tailwindcss-forms 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
marmelab/react-admin#11431 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effect未关闭bug
难度 2/5 1-3 小时 新手友好度 66/100
epam/statgpt-admin-frontend#305 ·
维护者通常 1 天内回复
-
possible bug
难度 2/5 1-3 小时 新手友好度 85/100
Mintplex-Labs/anything-llm#6889 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100