GithubHelp home page GithubHelp logo

Comments (5)

hotforfeature avatar hotforfeature commented on July 26, 2024 1

This is one of those issues developers hate: the dreaded missing semicolon. The "correct" way to write a CSS mixin is with a semicolon at the end:

html {
  --my-mixin: { display: none }; <--
  --might-still-work-but-not-correct: { display: none }
}

Angular's production build is minifying the CSS, which ShadyCSS parses at runtime. Unminified with a line break (dev mode), ShadyCSS can parse it. Minified without a line break (prod mode), it needs the semicolon.

The following CSS from your example works for me when I cloned the repo:

app.component.css

html {
  --app-word-wrapping: {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-wrap: break-word;
    word-break: break-word;
    -ms-word-break: break-word;
  }; <-- Note this worked without a semicolon because there are no rules following the "improper" mixin
}

.message-input-field {
  --paper-input-container-input-color: var(--app-input-color);
  --paper-input-container-underline: {
    display: none;
  };
  --paper-input-container-underline-focus: {
    display: none;
  };
  @apply --app-word-wrapping;
}

from polymer-chat.

firstor avatar firstor commented on July 26, 2024

To keep tracking the discussion of the issue:

from polymer-chat.

firstor avatar firstor commented on July 26, 2024

@hotforfeature Thanks for the update. Your last comment worked fine on my side. I mean the problem seemed fixed by simply replacing .message-input-field selector with paper-textarea.
However, this time I am curious to know how it could be fixed. Is it kind of a ShadyCSS bug, or anything else I need to concern?

from polymer-chat.

hotforfeature avatar hotforfeature commented on July 26, 2024

Glad the workaround fixed the problem. I'm not sure where the bug is, though my suspicion is to start looking at ShadyCSS because:

  • The problem only exists on Edge/IE
  • The problem exists in both dev and prod mode

This is still on my radar, though I've got one other issue on Origami that I'm working through first since this has an easy workaround. I'll update this discussion if I find out more.

from polymer-chat.

firstor avatar firstor commented on July 26, 2024

@hotforfeature Thanks for quick response. Will expect the next update with the background of the issue.

from polymer-chat.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.