Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Platform specific CSS being overridden by wrong platform CSS #8293

Copy link
Copy link
Open
@mrwrighty

Description

@mrwrighty
Issue body actions

Nativescript 6.3.3
Xcode 11.3.1
tns-ios 6.3.0
tns-android 6.3.1

I have 2 platform specific CSS files called platform.android.css and platform.ios.css.

Firstly to get them to work I have added them to my app.css as imports: -
@import url('platform.ios.css');
@import url('platform.android.css');

Both are used to define CSS on a segmented button, but the android version is overriding the iOS version.

XML for segbutton is: -

<SegmentedBar row="4" loaded="sbLoaded" selectedIndex="0" class="segNone" id="{{ segbuttonid }}" marginTop="20px" height="40" width="95%" touch="onTouchSeg"> <SegmentedBar.items> <SegmentedBarItem title="0" /> <SegmentedBarItem title="1" /> <SegmentedBarItem title="2" /> <SegmentedBarItem title="3" /> </SegmentedBar.items> </SegmentedBar>

platform.ios.css contains: -
.segNone{
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
selected-background-color: red;
color: white;
}

platform.android.css contains: -
.segNone{
font-family: Arial, Helvetica;
font-size: 16px;
color: red;
}

When compiling for iOS, the font colour is red, not white as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.