Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

CSS style : dev vs prod #610

Closed
pascalgrimaud opened this issue May 11, 2020 · 14 comments · Fixed by #611
Closed

CSS style : dev vs prod #610

pascalgrimaud opened this issue May 11, 2020 · 14 comments · Fixed by #611
Labels
bug Something isn't working

Comments

@pascalgrimaud
Copy link
Member

The CSS style is completely different when using in dev and in prod profile.
It seems because the custom css is not used at all in prod and the boostrap one override our custom style.

@pascalgrimaud pascalgrimaud added the bug Something isn't working label May 11, 2020
@pascalgrimaud
Copy link
Member Author

I think I'm not clear enough. I'll provider later more information to reproduce here

@atomfrede
Copy link
Member

You mean the white and grey parts or something more severe?

PROD:
image

DEV:
image

@pascalgrimaud
Copy link
Member Author

yes very minor here but there is a PR in jhipster control center, which uses Vue.js and the custom css is not used in prod.

And I saw the same for my gateway with vue.js for my current customer, with bootswatch

@atomfrede
Copy link
Member

So dev is correct, right?

@pascalgrimaud
Copy link
Member Author

I'll provide a screennshot as soon as possible :)
I don't know which one is the correct one. I think it's dev, yes

@atomfrede
Copy link
Member

At least I think it looks "better" :)

@pascalgrimaud
Copy link
Member Author

dev

prod

@pascalgrimaud
Copy link
Member Author

Using this diff, solves the problem:

diff --git a/src/main/webapp/content/scss/vendor.scss b/src/main/webapp/content/scss/vendor.scss
index 560f820..df40ab7 100644
--- a/src/main/webapp/content/scss/vendor.scss
+++ b/src/main/webapp/content/scss/vendor.scss
@@ -10,5 +10,6 @@ eg $input-color: red;
 @import '~bootstrap/scss/bootstrap';
 @import '~bootstrap-vue/src/index.scss';
 @import '~bootswatch/dist/spacelab/bootswatch';
+@import 'global.scss';

@atomfrede : do you think it's the correct fix ?

@atomfrede
Copy link
Member

atomfrede commented May 12, 2020

I looks strange imho. Don't we have a vendor and app.css file in the end? If you add global.css also to vendor it will be delivered twice I think. Once as part of vendor.css and as main.css

@pascalgrimaud
Copy link
Member Author

yes probably, but to be honest, I sux in CSS... I couldn't help much here lol

@atomfrede
Copy link
Member

Try to set the chunkSortMode to manual also in webpack.prod.

chunksSortMode: 'manual',

@pascalgrimaud
Copy link
Member Author

I think it works @atomfrede ! Thanks a lot

Our JHipster Control Center doesn't contain all new updates from Vue.js blueprint
See https://github.com/jhipster/jhipster-control-center/blob/master/webpack/webpack.prod.js#L71-L81

@pascalgrimaud
Copy link
Member Author

With your suggestion, our sidebar menu in JHipster Control Center works well -> jhipster/jhipster-control-center#56

jhcc

@atomfrede
Copy link
Member

Seen the screenshot in the other pr. Looks really cool. Looking forward to the final result. I can provide a pr for the blueprint with the fix.

atomfrede added a commit to atomfrede/jhipster-vuejs that referenced this issue May 13, 2020
atomfrede added a commit to atomfrede/jhipster-vuejs that referenced this issue May 15, 2020
atomfrede added a commit that referenced this issue May 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants