You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently all of the injected styles from this library would have a higher specificity, then antd styles, if used together with layer. This could cause specificity issues in the long run.
It would also make it easier for antd users, to use icons in their projects, if those would automatically get the same specificity layer as antd styles.
I could see two possible solutions to this:
Letting the IconContext set this for all icons and then using the context to conditionally wrap the iconStyles with the antd layer (probably easiest to do)
Applying the styles from this repo via @ant-design/css-in-js. Since we have to set layer already on the @ant-design/css-in-js, this should make sure the layer is also applied to the icons as well.
Let me know which solutions would work best and if I can help with any of those.
The text was updated successfully, but these errors were encountered:
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Since antd introduced a way to apply cascade layers to their styles (https://ant.design/docs/react/compatible-style#layer-downgrade), I was wondering, if we could support this for the icons as well.
Currently all of the injected styles from this library would have a higher specificity, then antd styles, if used together with
layer
. This could cause specificity issues in the long run.It would also make it easier for antd users, to use icons in their projects, if those would automatically get the same specificity layer as antd styles.
I could see two possible solutions to this:
IconContext
set this for all icons and then using the context to conditionally wrap the iconStyles with theantd
layer (probably easiest to do)@ant-design/css-in-js
. Since we have to setlayer
already on the@ant-design/css-in-js
, this should make sure the layer is also applied to the icons as well.Let me know which solutions would work best and if I can help with any of those.
The text was updated successfully, but these errors were encountered: