Skip to content

CSS border-color does not recognize rgb and rgba values #2781

Closed

Description

@3rror404

rgb and rgba values no longer work for border-color after upgrading tns-core-modules to 2.4.0. It was working in 2.3.0

XML:

<Page loaded="loaded">
    <GridLayout rows="*" cols="*" verticalAlignment="center">

        <Button text="Tap me" tap="signIn" />    

        <Label text="Label text" /> 

    </GridLayout>
</Page>

CSS:

Button {
    margin: 20;
    padding: 10;
    width: 50%;
    background-color: green;
    border-color: rgba(255,0,0,0.8); /* Doesn't work */
    border-color: rgb(255, 0, 0);  /* Doesn't work */
    border-color: red;  /* Works */
    border-color: #F00;  /* Works */
    border-width: 3;
}

Label {
    border-color: rgba(255,0,0,0.8); /* Doesn't work */
    border-color: rgb(255, 0, 0);  /* Doesn't work */
    border-color: red;  /* Works */
    border-color: #F00;  /* Works */
    border-width: 3;
}

Activity

  1. NickIliev commented on Sep 21, 2016

    @NickIliev
    Contributor

    @3rror404 thanks you for reporting that issue - we will look into that and come back with info when we have a resolution.

    Code to reproduce : https://github.com/NickIliev/NativeScript-issues/blob/master/NativeScript/issue_2781/app/app.css

  2. added this to the 2.4.0 milestone on Sep 21, 2016
  3. self-assigned this
    on Sep 21, 2016
  4. hamorphis commented on Sep 21, 2016

    @hamorphis
    Contributor

    I am working on a fix...

  5. changed the title [-]tns-core-modules 2.4.0 breaks border-color[/-] [+]CSS border-color does not recognize rgb and rgba values[/+] on Sep 21, 2016
  6. added 2 commits that reference this issue on Sep 21, 2016
    a6a9e18
    08f9c94
  7. 3rror404 commented on Sep 21, 2016

    @3rror404
    Author

    Hi @hamorphis,
    I've just noticed that using rgb or rgba for border-color also breaks border-radius on iOS. Not sure if your fix also addresses this?

    EDIT

    border-radius is also fixed in 2.4.0-2016-09-21-4189

  8. lock commented on Aug 29, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  9. locked and limited conversation to collaborators on Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions