Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Navigation-drawer background color change #11173

Closed
Noreu opened this issue Apr 21, 2020 · 9 comments
Closed

[Bug Report] Navigation-drawer background color change #11173

Noreu opened this issue Apr 21, 2020 · 9 comments
Assignees
Labels
C: VList C: VNavigationDrawer CSS specificity Different CSS on dev and production has workaround T: bug Functionality that does not work as intended/expected Vuetify 3 - Phase 2
Milestone

Comments

@Noreu
Copy link

Noreu commented Apr 21, 2020

Environment

Vuetify Version: 2.2.22
Vue Version: 2.6.11
Browsers: Firefox 75.0
OS: Windows 10

Steps to reproduce

Unfortunatly I can't reproduce the bug on codepen.
It's work on dev build with npm run serve, but doesn't work on production build with npm run build.

Expected Behavior

Navigation drawer with a grey background

Actual Behavior

Navigation drawer with a black background

Reproduction Link

https://codepen.io/Noreu/pen/RwWGmbR

Other comments

In production the .theme--dark.v-sheet background-color style override the .v-navigation-drawer .v-list background style and apply the the #1e1e1e color in place of inherit attribute.

I have some [mini-css-extract-plugins] error when I run build, for example :

chunk chunk-88ba3232 [mini-css-extract-plugin]
Conflicting order. Following module has been added:

  • css ./node_modules/css-loader/dist/cjs.js??ref--9-oneOf-3-1!./node_modules/postcss-loader/src??ref--9-oneOf-3-2!./node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-3-3!./node_modules/vuetify/src/components/VSheet/VSheet.sass
    despite it was not able to fulfill desired ordering with these modules:
  • css ./node_modules/css-loader/dist/cjs.js??ref--9-oneOf-3-1!./node_modules/postcss-loader/src??ref--9-oneOf-3-2!./node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-3-3!./node_modules/vuetify/src/directives/ripple/VRipple.sass
    • couldn't fulfill desired order of chunk group(s) , :
    • while fulfilling desired order of chunk group(s) , , , , , ,
  • css ./node_modules/css-loader/dist/cjs.js??ref--9-oneOf-3-1!./node_modules/postcss-loader/src??ref--9-oneOf-3-2!./node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-3-3!./node_modules/vuetify/src/components/VProgressLinear/VProgressLinear.sass
    • couldn't fulfill desired order of chunk group(s) ,
    • while fulfilling desired order of chunk group(s) , , , , , ,
  • css ./node_modules/css-loader/dist/cjs.js??ref--9-oneOf-3-1!./node_modules/postcss-loader/src??ref--9-oneOf-3-2!./node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-3-3!./node_modules/vuetify/src/components/VCard/VCard.sass
    • couldn't fulfill desired order of chunk group(s) ,
    • while fulfilling desired order of chunk group(s) , , , , , ,

I'm not comfortable with webpack but I view a tip wich tell to add the code above in vue.config.js :

css: {
    extract: {
      ignoreOrder: true
    },
  },

Warnings disapears but that don't resolve the problem.

Thanks for the help !

@ghost ghost added the S: triage label Apr 21, 2020
@jacekkarczmarczyk
Copy link
Member

We accept minimal github repo as reproduction as well

@jacekkarczmarczyk jacekkarczmarczyk added the S: needs reproduction The issue does not contain a valid reproduction label Apr 21, 2020
@Noreu
Copy link
Author

Noreu commented Apr 21, 2020

Tried to reproduce the error but I can't.
Don't know why it's work with a smaller project but the warnings are still there during the build...

@jacekkarczmarczyk
Copy link
Member

You can send screenshots of markup + css both for development and production, similar like in #8067 (comment)

@Noreu
Copy link
Author

Noreu commented Apr 21, 2020

The good way :
navigation-drawer_right

The wrong :
navigation-drawer_false

I just see it's another css file that override the .theme--dark.v-sheet css rules.

@jacekkarczmarczyk jacekkarczmarczyk removed the S: needs reproduction The issue does not contain a valid reproduction label Apr 21, 2020
@jacekkarczmarczyk jacekkarczmarczyk added the CSS specificity Different CSS on dev and production label May 3, 2020
@yesworld

This comment has been minimized.

@Noreu
Copy link
Author

Noreu commented Jun 15, 2020

I solved the problem with this line on the vue.config.js file :

lintOnSave: false,
  runtimeCompiler: true,
  filenameHashing:false,
  productionSourceMap: false,
  configureWebpack: {
    resolve: {
       symlinks: false
    },
    optimization: {
      splitChunks: {
       cacheGroups: {
          app: {
            chunks: 'all',
            name: 'main',
            test: /[\\/]src[\\/](.*)[\\/]/,
          },
          flagIcons: {
            chunks: 'all',
            name: 'flagIcons',                
           //test: /[\\/]node_modules[\\/]@coreui[\\/]((icons).*)[\\/]/,
            test: /[\\/]node_modules[\\/]@coreui[\\/]icons[\\/]js[\\/]((flag).*)[\\/]/,
          },
          freeIcons: {
            chunks: 'all',
            name: 'freeIcons',                
           //test: /[\\/]node_modules[\\/]@coreui[\\/]((icons).*)[\\/]/,
            test: /[\\/]node_modules[\\/]@coreui[\\/]icons[\\/]js[\\/]((free).*)[\\/]/,
          },
          brandIcons: {
            chunks: 'all',
            name: 'brandIcons',                
            test: /[\\/]node_modules[\\/]@coreui[\\/]icons[\\/]js[\\/]((brand).*)[\\/]/,
          },
          vendors: {
            chunks: 'all',
            name: 'vendors',
            test: /[\\/]node_modules[\\/]@coreui[\\/]((?!icons).*)[\\/]/,
          },
          // Merge all the CSS into one file
          styles: {
            name: 'styles',
            test: /\.s?css$/,
            chunks: 'all',
            minChunks: 1,
            reuseExistingChunk: true,
            enforce: true,
          }
        }
      }
    }
  }

@matheuschimelli
Copy link

matheuschimelli commented Jun 20, 2020

I'm having the same problem with v-drawer. I tried to update vuetify to the last stable version but it didn't work. I'm suspecting the problem itself is with the color property on v-drawer that is not been applied because the theme--dark.v-sheet class is overwriting the color property

image

The color property is applied, but it has not effect
image

I solve it by adding a class on v-list:

<v-list class="customListColor">
.customListColor {
  background: rgb(55, 71, 79) !important;
}

It is just a quick fix but it solved my problem with v-drawer. I think that it could have a better way to handle with this error, but as i said it is just a quick fix.

@KaelWD KaelWD added C: VList C: VNavigationDrawer T: bug Functionality that does not work as intended/expected and removed S: triage labels Oct 7, 2020
@johnleider johnleider added this to the v3.0.0 milestone Dec 16, 2020
@KaelWD
Copy link
Member

KaelWD commented Jan 25, 2021

<v-list color="transparent">

@johnleider
Copy link
Member

fixed in baeb8a6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VList C: VNavigationDrawer CSS specificity Different CSS on dev and production has workaround T: bug Functionality that does not work as intended/expected Vuetify 3 - Phase 2
Projects
None yet
Development

No branches or pull requests

7 participants