eclipsesource / eclipsesource/tabris-js

Add support for Magic corners in linear gradient

Open
#1,830 2 comments 0 reactions 0 assignees View on GitHub
feature js
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

### Problem description
Setting a `linear-gradient` with an angle with two direction components does not work. Eg. `linear-gradient(to right bottom, yellow, red)` causes an error stating that the `background` should be treated as an _image_.

> ```Could not process 'create' with {background={type="image", image=["linear-gradient(to right bottom, yellow, red)", null, null, null]} for type 'tabris.Composite' ('$13')```

### Expected behavior

A two element direction should be supported on the linear-gradient as per w3c spec.

### Environment

- Tabris.js version: 3.0-beta2
- Device: Android Emulator
- OS: Android 9.0

### Code snippet

```javascript
import {Composite, contentView} from 'tabris';

new Composite({
layoutData: 'fill',
background: 'linear-gradient(to right bottom, yellow, red)'
}).appendTo(contentView);
```

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.