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
Hey! I am implementing a component library for VueJS2 and there is a need to keep each style separately for the component.
But there was a problem with nesting and the impact on styles of nested styles.
Once created, the StyleSheet is not initialized internally to a reference to another class.
How can I work around this problem?
Style component Button: rButton: { cursor: 'pointer', border: 0, display: 'flex', '& $rIcon': { marginLeft: 20 } }
Style component Icon: rIcon: { display: 'inline-flex' }
After the button is initialized, the icon class after addRule is not rewritten in styles to the icon class
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey! I am implementing a component library for VueJS2 and there is a need to keep each style separately for the component.
But there was a problem with nesting and the impact on styles of nested styles.
Once created, the StyleSheet is not initialized internally to a reference to another class.
How can I work around this problem?
Style component Button:
rButton: { cursor: 'pointer', border: 0, display: 'flex', '& $rIcon': { marginLeft: 20 } }
Style component Icon:
rIcon: { display: 'inline-flex' }
After the button is initialized, the icon class after addRule is not rewritten in styles to the icon class
Beta Was this translation helpful? Give feedback.
All reactions