Partial style merging
Author: chbybnwrCreated Aug 11, 2026Updated Sep 3, 2026
Labelsenhancement
Describe the feature request
This can be resolved to the same style
const styles = stylex.create({
foo: {
color: {
default: 'red',
':focus': 'blue'
}
},
bar: {
color: stylex.partial({
':focus': 'green'
})
}
})
stylex.props(styles.foo, styles.bar)as this
const styles = stylex.create({
baz: {
color: {
default: 'red',
':focus': 'green'
}
}
})
stylex.props(styles.baz)Source: facebook/stylex