facebook / facebook/stylex

Partial style merging

Open
#1,803 2 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
10.3k
Forks
481
Avg merge
3d 8h
Merged PRs (30d)
13

Description

### Describe the feature request

This can be resolved to the same style
```js
const styles = stylex.create({
foo: {
color: {
default: 'red',
':focus': 'blue'
}
},
bar: {
color: stylex.partial({
':focus': 'green'
})
}
})

stylex.props(styles.foo, styles.bar)
```
as this
```js
const styles = stylex.create({
baz: {
color: {
default: 'red',
':focus': 'green'
}
}
})

stylex.props(styles.baz)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.