Skip to content

Nuxt build css optimize cause broken style. #1

@toshusai

Description

@toshusai

In development mode.
.spectrum-TreeView-itemLink has below styles.

    padding-top: var(--spectrum-treeview-item-text-padding-top);
    padding-bottom: var(--spectrum-treeview-item-text-padding-bottom);
    padding-left: var(--spectrum-treeview-item-affordance-size);
    padding-right: var(--spectrum-treeview-item-affordance-size);

In production (nuxt generate)

    padding: var(--spectrum-treeview-item-text-padding-top) var(--spectrum-treeview-item-affordance-size) var(--spectrum-treeview-item-text-padding-bottom);

padding-right is missing. So TreeView don't show Chevron.

What is the cause of this problem? webpack in Nuxt?, css-loader?, or Spectrum CSS?
Look like var(--spectrum-treeview-item-text-padding-bottom) is not defined. Is this cause of missing padding-right?

Anyway, we need to investigate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions