Sitelet https://web.archive.org/web/20211125171129/https://github.com/NativeScript/NativeScript/issues/9559
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get error when use transparent for color and background-color. Error: Expected 1 or 4 constructor parameters. #9559

Closed
anmaitrannguyen opened this issue Sep 20, 2021 · 1 comment
Labels

Comments

@anmaitrannguyen
Copy link

@anmaitrannguyen anmaitrannguyen commented Sep 20, 2021

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 8.1.1
  • Cross-platform modules: 8.1.3
  • Android Runtime: 8.1.0
  • iOS Runtime: 8.1.0
  • XCode Version:
  • Plugin(s):

Describe the bug
In new version, when I set the color or background-color with css or by attributewith the value "transparent", I will get this error:
Error: Failed to apply property [background] with value [transparent] to GridLayout(69). Error: Expected 1 or 4 constructor parameters.
For css, if I change from transparent to rgba(0,0,0,0), it will working. But for the inline attribute, like this:
<StackLayout
background="rgba(0,0,0,0)"

I will still get the above error:
Failed to apply property [background] with value [rgba(0, 0, 0, 0)] to GridLayout(69). Error: Expected 1 or 4 constructor parameters.
To Reproduce
<StackLayout
background="rgba(0,0,0,0)"

For css:
background: transparent;

Expected behavior
It should be working like before.
Sample project

Additional context

@rigor789
Copy link
Member

@rigor789 rigor789 commented Sep 22, 2021

I believe this was fixed by #9560 - since the merge, this was auto-released in version 8.1.3-next-09-22-2021-1260380904, and will eventually land in a release soon.

Loading

@rigor789 rigor789 closed this Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants