Skip to content

Non --dev build removes CSS style #1152

@kensodemann

Description

@kensodemann

Stencil version:

 @stencil/core@0.14.0-6 (also occurs in 0.13.2)

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

Given the following scss:

        .stable-border {
          // border: 1px solid cssvar(stable-light) !important;
          border: 1px solid cssvar(stable-light);
        }

If the line with !important is used, the color portion is elided from the generated CSS when doing npm run build.

If the line without !important is used, the color portion is included in the generated CSS when doing npm run build.

If using npm run build -- --dev, the color portion is always included whether or not !important is used.

Expected behavior:

The color portion would always be included in the generated CSS.

Steps to reproduce:

I have a private repo that can be cloned. It is based on code from a community member. If you need the URL, please DM me on Slack.

  1. clone the private repo
  2. npm i
  3. search for "stable-border" in the code, it should only be in one place
  4. alternate the line that is used in the build
  5. look at the output

With npm run build -- --dev the color portion will always be there
With npm run build the color portion will not be included when !important is used

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions