Some Css is not working when building with uglify option


#1

I have found that in some cases that nested SCSS won’t be effective if uglify option is used on the build.
Workaround is to avoid nesting… not nice, but ok.

But the worst case is that the background-color of a ScrollView is not applied on uglified build, as displayed on the attached image.

<RadSideDrawer #drawer showOverNavigation="true" [drawerTransition]="sideDrawerTransition">
    <StackLayout tkDrawerContent>
        <MyDrawer [selectedPage]="'Info'"></MyDrawer>
    </StackLayout>

    <GridLayout class="page page-content" tkMainContent>
        <ScrollView class="page" #scrollView (scroll)="onScroll($event, scrollView, topView)">
            <StackLayout>
GridLayout, ScrollView, StackLayout {color: white;  background-color:#0a182d;}


#2

As a workaround, can you assign a custom class to the layout tag, and use that? <ScrollView class="whatever">, then in css use .whatever { ... }.


#3

As Eddy suggested use class name or if you really want to stick to tag name then try adding ScrollView to mangel excludes / reserved list thats found in webpack config.