如何为我的NPM包设置基本字体尺寸
我有2个主要项目,一个项目是使用基本字体大小为14px,另一个项目使用基本字体大小为10px。我在两个主要项目中都使用尾风CSS。因此,如果我使用文本碱体,即主项目内的字体大小的文本SM,则字体大小取决于REM和REM取决于根字体大小。
我使用汇总,尾风,React创建了一个NPM软件包,并且在我的两个主要项目中使用了创建的库。我想仅在我的NPM软件包UI组件中使用基本字体大小为16px。但是在最终输出中,NPM软件包内的代码正在采用主要项目基础字体大小。
是否有任何选择在NPM软件包内使用不同的基本字体大小和主项目
I have 2 main projects, one project is using base font size as 14px and another one is using base font size as 10px. I am using tailwind css inside both main projects. So if I use text-base, text-sm for font size inside main projects, font size depends on rem and rem depends on root font size.
I have created a npm package using rollup, tailwind, react and I am using created library inside my 2 main projects. I would like to use base font size as 16px only in my npm package UI Components. But in the final output, code inside npm package is taking the main project base font size.
Is there any option to use different base font size inside npm package and main project seperately
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过将
text-base
的默认大小从16px替换为tailwind.config.js
file files 。tailwind.config.js
更多资源在这里
You can customise the font size by replacing the default size of
text-base
from 16px to 14px intailwind.config.js
file of your project.tailwind.config.js
More resources here