cssinjs icon indicating copy to clipboard operation
cssinjs copied to clipboard

Results 59 cssinjs issues
Sort by recently updated
recently updated
newest added

antd团队你们好,这个pr主要同步了 [pxtorem](https://github.com/cuth/postcss-pxtorem) 和 [@minko-fe/pxtorem](https://github.com/hemengke1997/postcss-pxtorem) 的部分逻辑 新增了一些配置项: 1. minPixelValue,设置最小转化的px大小 2. propList,设置可转化为rem的css属性 3. selectorBlackList: { match, deep },黑名单相关,match用于匹配className;deep用于控制是否深度黑名单,若为true,则匹配到的类及其子类都会列入黑名单 4. convertUnit,其目的用于转化 PX、Px 这种不规范的单位至px(并不会转rem) 由于其他的transformer都把逻辑写在同一文件中,所以此处也没有拆分代码 命名、代码风格等可能不符合antd团队规范,若有任何问题,请随意修改,谢谢!

根据官方示例: ![image](https://github.com/ant-design/cssinjs/assets/9392200/dc68823b-9aa5-4b13-b404-98542aa341cf) 控制台打印: ![image](https://github.com/ant-design/cssinjs/assets/9392200/01a1ac84-b604-4dee-91b0-1c25e8173163) 实际渲染结果: ![image](https://github.com/ant-design/cssinjs/assets/9392200/e1f921e6-d1b6-4a21-a41e-f0beddddfba3) 框架:[email protected] 模式:APP Router antd:5.10.2

Hi, I'm using the ant.design. In the config I have set up: ``` ``` dynamicCSS.js:73 : Refused to apply inline style because it violates the following Content Security Policy directive:...

我想调用antd 的默认样式比如主色,以前的话是var(--ant-primary-color)。现在怎么完成使用这个颜色

Hi, I'm using nextjs@13 + antd@5. And browser show this in devtool: ``` Warning: Prop `className` did not match. Server: "ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-dark css-dev-only-do-not-override-1dsa5t3" Client: "ant-menu-overflow ant-menu ant-menu-root...

I would expect there to be a `package-lock.json` in the repository. Why isn't there one?

## 问题 在SSR场景`ssrInine={true}`导致重复的组件样式会被多次抽取打进html,导致文档的体积增大,nextjs里面无法直接使用`rendertostring/renderToNodeStream` ## 解决 利用记录次数,在服务端对于在cache中相同key对应的样式,只插入文档一次,并且利用react生命周期传递cache对象,不能使用defaultCache(次数是node的全局累计) ## 使用 ```tsx 'use client'; import {StyleProvider, createCache, legacyLogicalPropertiesTransformer} from '@ant-design/cssinjs'; import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; import {ConfigProvider, App} from 'antd'; import zhCN...

我的 chrome 插件(用的 plasmo 框架)有两个 shadowDom 的 content_script 注入,其中随机的出现部分 antd 样式丢失,比如 `ant-tooltip` 发现所在的 shadowRoot 中相关的 style 标签为空了 而同一个页面另外个 shadowRoot 正常: 对应的 style 标签内容正常: 两个 shadowRoot 的 StyleProvider 写法也没区别: ```ts 和...