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):
Describe the bug
Previous NS the following CSS created a transparent button for Android (removing material ripple and shadow)
.btn-transparent {
background-color: transparent;
border-color: transparent;
border-width: 1;
}
To Reproduce
Run that CSS on 5.3 or older project and button is great on Android21+. With NS 5.4 it doesn't work.
Expected behavior
Remove shadow, ripple, material effects.
* Work around *
z-index: 0; /* need this in NS 5.4 */
adding z-index in 5.4 will produce the desired outcome.
The buttons on Android since 5.4 have default elevation (shadow) of 2, due to the new elevation support. You can remove it with:
.btn-transparent {
android-elevation: 0;
}
Good to know thanks @bundyo - probably just need to document this under breaking change some how, I've been given the old CSS styles as the go to solution for years now as have most others I've worked with. Just imagining more users eventually updating and they'll be stumped why their buttons aren't styled same 馃憤 - thanks for the info.
Documentation note added via https://github.com/NativeScript/docs/pull/1676
Most helpful comment
The buttons on Android since 5.4 have default elevation (shadow) of 2, due to the new elevation support. You can remove it with: