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

SASS Customization Issue Causing UI Disruption in Vuetify Theme Configuration #212

Closed
santiagoaloi opened this issue Apr 5, 2024 · 2 comments

Comments

@santiagoaloi
Copy link
Member

santiagoaloi commented Apr 5, 2024

Issue Details:


Github repo
Live showing the issue with custom SASS

I would like to bring to your attention an issue regarding SASS customization in our Vuetify theme configuration.

Currently, when attempting to customize the theme using SASS, it inadvertently disrupts the UI instead of applying the desired changes.

Description:

The problem arises when trying to customize the Vuetify theme using SASS.

Symptoms:

Instead of applying the intended customizations, the UI becomes disrupted, breaking styles and causing functional issues.
Impact: This issue significantly affects the user experience and usability of our application.

Steps to Reproduce:

Attempt to customize the Vuetify theme using SASS.
Observe the unintended disruption of the UI and broken styles.

nuxt.config.ts

  vuetify: {
    moduleOptions: {
      styles: {
    // This section has been problematic as it inadvertently disrupts the UI rather than customizing the Vuetify theme as intended.
    // By commenting out the settings below, the UI functions as expected without any style disruptions. However,
    // this means sacrificing /the ability to customize using SASS.
        configFile: 'assets/scss/settings.scss',
      },
    },
  },

settings.scss

@forward 'vuetify/settings' with (
  // Buttons
  $button-disabled-opacity: 0.5,
  $button-disabled-overlay: 0.1,
  $button-text-transform: '',
  $button-text-letter-spacing: 0px,
);

Expected Behavior:

Customizing the Vuetify theme using SASS should apply the desired changes without causing any disruption to the UI or breaking styles.

Comparison: Normal UI vs. UI with Custom SASS Application

Working

Screenshot 2024-04-05 at 03 29 59

Broken

broken

Workaround:

Commenting out the SASS customization settings restores normal functionality,
but this means sacrificing the ability to customize using SASS, which is not an ideal solution.

@santiagoaloi
Copy link
Member Author

santiagoaloi commented Apr 5, 2024

I got inspired by #172 - By importing Vuetify styles in the following manner, I managed to resolve the broken UI.

Although it introduces a minor CSS duplication issue, the solution still maintains a high level of performance.
it would be beneficial to explore alternative approaches for a more robust solution.

nuxt.config.ts

css: [
  'vuetify/styles',
],

santiagoaloi added a commit to santiagoaloi/vuetify-nuxt-module that referenced this issue Apr 5, 2024
During my troubleshooting vuetifyjs#212, regarding using custom Sass styles in components, only by manually importing Vuetify styles the custom Sass changes are applied without causing UI disruption.

By always importing styles, no manual syle import is necessary.
This is a suggestion from Kael.
@santiagoaloi
Copy link
Member Author

Submitted a PR proposing a permanent fix for SASS customization issues 🙌
#213

userquin pushed a commit that referenced this issue Apr 8, 2024
* fix: should always include styles

During my troubleshooting #212, regarding using custom Sass styles in components, only by manually importing Vuetify styles the custom Sass changes are applied without causing UI disruption.

By always importing styles, no manual syle import is necessary.
This is a suggestion from Kael.

* chore: fix lint

---------
@userquin userquin closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants