Some component styles not included in build












0















I have just noticed that my Vue/Nuxt app is not applying some component styles following build.



The styles are applied as expected in DEVELOPMENT, but once deployed, they don't appear.



Other styles within the component are rendered fine.



Dev Render:



Dev Render



Prod Render:



Prod Render



The styles are applied in the component using the <style> tag.



<style lang="scss">
.listing-wrapper {
display: grid;
grid-template-columns: 1fr;

@media (min-width: 1024px) {
grid-template-columns: 50vw 50vw;
}
}

.listing-intro {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;

@media (min-width: 1024px) {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;
}
}

.listing-map {
position: relative;
background-color: #cccccc;
text-align: center;
align-items: center;
justify-content: center;

@media (min-width: 1024px) {
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 2;
}

.explore-map {
width: 100%;
height: 100%;

> div {
min-height: 50vh;
height: auto;
}
}
}
</style>


The template:



<template>
<div>
<layout-hero :pageRef="pageContent[0].id"></layout-hero>
<main class="main listing-page">
<h1 v-html="pageContent[0].title.rendered + ' around Karratha'"></h1>
<div class="listing-wrapper" v-if="pageContent[0].id != 68">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block" v-html="pageContent[0].content.rendered"></section>
<section class="listing-map">
<layout-map :mapVersion="'activity-map'" :mapCategory="pageContent[0].title.rendered" :zoomVal="7"></layout-map>
</section>
</div>
<div v-else>
<div class="listing-wrapper">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block full-width" v-html="pageContent[0].content.rendered"></section>
</div>
</div>
</main>
</div>
</template>


Is it related to the class being on the same div as the v-if?










share|improve this question

























  • When you check in dev tools, are the class names being applied in the right places? That's a good place to start debugging.

    – David Weldon
    Dec 31 '18 at 19:47











  • @DavidWeldon Sorry, I should've mentioned, the class names are not rendered on the div in the Production version. They are fine on the Development version. It's like it's not picking them up at all, but it's picking up other styles in the component. I don't understand why it's partially working.

    – AlxTheRed
    Dec 31 '18 at 19:55











  • Does "production" mean "on a production server" or in "production mode" on your local machine? If it's the former, could it be that your code isn't being pushed properly or the old version is just cached in your browser?

    – David Weldon
    Dec 31 '18 at 20:15











  • Which styles are not included? Are they related to the grid?

    – Soleno
    Dec 31 '18 at 20:22











  • @Soleno It’s the styles i’ve Included above that aren’t being included. Everything else is, and the same kind of styles are loaded fine on another template.

    – AlxTheRed
    Jan 1 at 1:10
















0















I have just noticed that my Vue/Nuxt app is not applying some component styles following build.



The styles are applied as expected in DEVELOPMENT, but once deployed, they don't appear.



Other styles within the component are rendered fine.



Dev Render:



Dev Render



Prod Render:



Prod Render



The styles are applied in the component using the <style> tag.



<style lang="scss">
.listing-wrapper {
display: grid;
grid-template-columns: 1fr;

@media (min-width: 1024px) {
grid-template-columns: 50vw 50vw;
}
}

.listing-intro {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;

@media (min-width: 1024px) {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;
}
}

.listing-map {
position: relative;
background-color: #cccccc;
text-align: center;
align-items: center;
justify-content: center;

@media (min-width: 1024px) {
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 2;
}

.explore-map {
width: 100%;
height: 100%;

> div {
min-height: 50vh;
height: auto;
}
}
}
</style>


The template:



<template>
<div>
<layout-hero :pageRef="pageContent[0].id"></layout-hero>
<main class="main listing-page">
<h1 v-html="pageContent[0].title.rendered + ' around Karratha'"></h1>
<div class="listing-wrapper" v-if="pageContent[0].id != 68">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block" v-html="pageContent[0].content.rendered"></section>
<section class="listing-map">
<layout-map :mapVersion="'activity-map'" :mapCategory="pageContent[0].title.rendered" :zoomVal="7"></layout-map>
</section>
</div>
<div v-else>
<div class="listing-wrapper">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block full-width" v-html="pageContent[0].content.rendered"></section>
</div>
</div>
</main>
</div>
</template>


Is it related to the class being on the same div as the v-if?










share|improve this question

























  • When you check in dev tools, are the class names being applied in the right places? That's a good place to start debugging.

    – David Weldon
    Dec 31 '18 at 19:47











  • @DavidWeldon Sorry, I should've mentioned, the class names are not rendered on the div in the Production version. They are fine on the Development version. It's like it's not picking them up at all, but it's picking up other styles in the component. I don't understand why it's partially working.

    – AlxTheRed
    Dec 31 '18 at 19:55











  • Does "production" mean "on a production server" or in "production mode" on your local machine? If it's the former, could it be that your code isn't being pushed properly or the old version is just cached in your browser?

    – David Weldon
    Dec 31 '18 at 20:15











  • Which styles are not included? Are they related to the grid?

    – Soleno
    Dec 31 '18 at 20:22











  • @Soleno It’s the styles i’ve Included above that aren’t being included. Everything else is, and the same kind of styles are loaded fine on another template.

    – AlxTheRed
    Jan 1 at 1:10














0












0








0








I have just noticed that my Vue/Nuxt app is not applying some component styles following build.



The styles are applied as expected in DEVELOPMENT, but once deployed, they don't appear.



Other styles within the component are rendered fine.



Dev Render:



Dev Render



Prod Render:



Prod Render



The styles are applied in the component using the <style> tag.



<style lang="scss">
.listing-wrapper {
display: grid;
grid-template-columns: 1fr;

@media (min-width: 1024px) {
grid-template-columns: 50vw 50vw;
}
}

.listing-intro {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;

@media (min-width: 1024px) {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;
}
}

.listing-map {
position: relative;
background-color: #cccccc;
text-align: center;
align-items: center;
justify-content: center;

@media (min-width: 1024px) {
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 2;
}

.explore-map {
width: 100%;
height: 100%;

> div {
min-height: 50vh;
height: auto;
}
}
}
</style>


The template:



<template>
<div>
<layout-hero :pageRef="pageContent[0].id"></layout-hero>
<main class="main listing-page">
<h1 v-html="pageContent[0].title.rendered + ' around Karratha'"></h1>
<div class="listing-wrapper" v-if="pageContent[0].id != 68">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block" v-html="pageContent[0].content.rendered"></section>
<section class="listing-map">
<layout-map :mapVersion="'activity-map'" :mapCategory="pageContent[0].title.rendered" :zoomVal="7"></layout-map>
</section>
</div>
<div v-else>
<div class="listing-wrapper">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block full-width" v-html="pageContent[0].content.rendered"></section>
</div>
</div>
</main>
</div>
</template>


Is it related to the class being on the same div as the v-if?










share|improve this question
















I have just noticed that my Vue/Nuxt app is not applying some component styles following build.



The styles are applied as expected in DEVELOPMENT, but once deployed, they don't appear.



Other styles within the component are rendered fine.



Dev Render:



Dev Render



Prod Render:



Prod Render



The styles are applied in the component using the <style> tag.



<style lang="scss">
.listing-wrapper {
display: grid;
grid-template-columns: 1fr;

@media (min-width: 1024px) {
grid-template-columns: 50vw 50vw;
}
}

.listing-intro {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;

@media (min-width: 1024px) {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;
}
}

.listing-map {
position: relative;
background-color: #cccccc;
text-align: center;
align-items: center;
justify-content: center;

@media (min-width: 1024px) {
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 2;
}

.explore-map {
width: 100%;
height: 100%;

> div {
min-height: 50vh;
height: auto;
}
}
}
</style>


The template:



<template>
<div>
<layout-hero :pageRef="pageContent[0].id"></layout-hero>
<main class="main listing-page">
<h1 v-html="pageContent[0].title.rendered + ' around Karratha'"></h1>
<div class="listing-wrapper" v-if="pageContent[0].id != 68">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block" v-html="pageContent[0].content.rendered"></section>
<section class="listing-map">
<layout-map :mapVersion="'activity-map'" :mapCategory="pageContent[0].title.rendered" :zoomVal="7"></layout-map>
</section>
</div>
<div v-else>
<div class="listing-wrapper">
<section v-if="pageContent[0].content.rendered" class="listing-intro listing-content-block full-width" v-html="pageContent[0].content.rendered"></section>
</div>
</div>
</main>
</div>
</template>


Is it related to the class being on the same div as the v-if?







javascript css vue.js nuxt.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 31 '18 at 19:51









chazsolo

5,2701233




5,2701233










asked Dec 31 '18 at 19:03









AlxTheRedAlxTheRed

120111




120111













  • When you check in dev tools, are the class names being applied in the right places? That's a good place to start debugging.

    – David Weldon
    Dec 31 '18 at 19:47











  • @DavidWeldon Sorry, I should've mentioned, the class names are not rendered on the div in the Production version. They are fine on the Development version. It's like it's not picking them up at all, but it's picking up other styles in the component. I don't understand why it's partially working.

    – AlxTheRed
    Dec 31 '18 at 19:55











  • Does "production" mean "on a production server" or in "production mode" on your local machine? If it's the former, could it be that your code isn't being pushed properly or the old version is just cached in your browser?

    – David Weldon
    Dec 31 '18 at 20:15











  • Which styles are not included? Are they related to the grid?

    – Soleno
    Dec 31 '18 at 20:22











  • @Soleno It’s the styles i’ve Included above that aren’t being included. Everything else is, and the same kind of styles are loaded fine on another template.

    – AlxTheRed
    Jan 1 at 1:10



















  • When you check in dev tools, are the class names being applied in the right places? That's a good place to start debugging.

    – David Weldon
    Dec 31 '18 at 19:47











  • @DavidWeldon Sorry, I should've mentioned, the class names are not rendered on the div in the Production version. They are fine on the Development version. It's like it's not picking them up at all, but it's picking up other styles in the component. I don't understand why it's partially working.

    – AlxTheRed
    Dec 31 '18 at 19:55











  • Does "production" mean "on a production server" or in "production mode" on your local machine? If it's the former, could it be that your code isn't being pushed properly or the old version is just cached in your browser?

    – David Weldon
    Dec 31 '18 at 20:15











  • Which styles are not included? Are they related to the grid?

    – Soleno
    Dec 31 '18 at 20:22











  • @Soleno It’s the styles i’ve Included above that aren’t being included. Everything else is, and the same kind of styles are loaded fine on another template.

    – AlxTheRed
    Jan 1 at 1:10

















When you check in dev tools, are the class names being applied in the right places? That's a good place to start debugging.

– David Weldon
Dec 31 '18 at 19:47





When you check in dev tools, are the class names being applied in the right places? That's a good place to start debugging.

– David Weldon
Dec 31 '18 at 19:47













@DavidWeldon Sorry, I should've mentioned, the class names are not rendered on the div in the Production version. They are fine on the Development version. It's like it's not picking them up at all, but it's picking up other styles in the component. I don't understand why it's partially working.

– AlxTheRed
Dec 31 '18 at 19:55





@DavidWeldon Sorry, I should've mentioned, the class names are not rendered on the div in the Production version. They are fine on the Development version. It's like it's not picking them up at all, but it's picking up other styles in the component. I don't understand why it's partially working.

– AlxTheRed
Dec 31 '18 at 19:55













Does "production" mean "on a production server" or in "production mode" on your local machine? If it's the former, could it be that your code isn't being pushed properly or the old version is just cached in your browser?

– David Weldon
Dec 31 '18 at 20:15





Does "production" mean "on a production server" or in "production mode" on your local machine? If it's the former, could it be that your code isn't being pushed properly or the old version is just cached in your browser?

– David Weldon
Dec 31 '18 at 20:15













Which styles are not included? Are they related to the grid?

– Soleno
Dec 31 '18 at 20:22





Which styles are not included? Are they related to the grid?

– Soleno
Dec 31 '18 at 20:22













@Soleno It’s the styles i’ve Included above that aren’t being included. Everything else is, and the same kind of styles are loaded fine on another template.

– AlxTheRed
Jan 1 at 1:10





@Soleno It’s the styles i’ve Included above that aren’t being included. Everything else is, and the same kind of styles are loaded fine on another template.

– AlxTheRed
Jan 1 at 1:10












1 Answer
1






active

oldest

votes


















0














After stepping away for a day after two weeks of solid work I discovered the issue was due to a style coming through from the map component that was overriding the parent component style.



I am still getting differences between local dev and live production though, even after clearing browser cache and purging the app cache.



UPDATE: The issue was due to scoped being included on the map components style block. It is now working as expected.



Thank you for all your suggestions.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53990643%2fsome-component-styles-not-included-in-build%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    After stepping away for a day after two weeks of solid work I discovered the issue was due to a style coming through from the map component that was overriding the parent component style.



    I am still getting differences between local dev and live production though, even after clearing browser cache and purging the app cache.



    UPDATE: The issue was due to scoped being included on the map components style block. It is now working as expected.



    Thank you for all your suggestions.






    share|improve this answer






























      0














      After stepping away for a day after two weeks of solid work I discovered the issue was due to a style coming through from the map component that was overriding the parent component style.



      I am still getting differences between local dev and live production though, even after clearing browser cache and purging the app cache.



      UPDATE: The issue was due to scoped being included on the map components style block. It is now working as expected.



      Thank you for all your suggestions.






      share|improve this answer




























        0












        0








        0







        After stepping away for a day after two weeks of solid work I discovered the issue was due to a style coming through from the map component that was overriding the parent component style.



        I am still getting differences between local dev and live production though, even after clearing browser cache and purging the app cache.



        UPDATE: The issue was due to scoped being included on the map components style block. It is now working as expected.



        Thank you for all your suggestions.






        share|improve this answer















        After stepping away for a day after two weeks of solid work I discovered the issue was due to a style coming through from the map component that was overriding the parent component style.



        I am still getting differences between local dev and live production though, even after clearing browser cache and purging the app cache.



        UPDATE: The issue was due to scoped being included on the map components style block. It is now working as expected.



        Thank you for all your suggestions.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 2 at 4:21

























        answered Jan 2 at 3:53









        AlxTheRedAlxTheRed

        120111




        120111
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53990643%2fsome-component-styles-not-included-in-build%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas

            Can't read property showImagePicker of undefined in react native iOS