postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
596 stars 77 forks source link

Let "warnings" option silence all warnings #67

Closed bundyo closed 7 years ago

bundyo commented 7 years ago

The main reason for this change is that I'm building an Electron app and I don't need fallbacks for my variables.

P.S. If the warnings themselves are not a reason enough, please also consider build logs getting huge and hard to find something in them.

MoOx commented 7 years ago

So you use code that's not going to work? Electron is supporting custom props already since it's chrome http://caniuse.com/#search=custom%20proper So why do you use this plugin in the first place?

bundyo commented 7 years ago

Yes, Electron (Chrome) supports custom properties, but it doesn't support the color function, so in order for postcss to compile it, I need to also use postcss-custom-properties (with preserve: "computed"), even if I don't really need it in the renderer. I wonder if postcss can make use of libchromiumcontent to avoid such issues... probably not, but that's not the point of this pull request. :)

bundyo commented 7 years ago

Do we have a decision regarding this issue?

s-panferov commented 7 years ago

Plz merge this. This is useful when you're using both "real" and "fake" custom properties.

jonathantneal commented 7 years ago

I use real and fake custom properties, too. This would be very helpful.

jonathantneal commented 7 years ago

@MoOx, no one is assigned to this. May I assign myself, resolve the conflicts, and merge? There is a need for this, particularly when one must rely on real custom properties.

Here’s my case:

.some-slideout-drawer {
  min-height: 100vh;
  min-height: var(--inner-vh, 100vh);
  width: calc(100vw - 50px);
  width: calc(var(--inner-vw, 100vw) - 50px);
}

Where --inner-vw and --inner-vh are defined as:

function onresize() {
  document.documentElement.style.setProperty('--inner-vw', `${document.documentElement.clientWidth}px`);
  document.documentElement.style.setProperty('--inner-vh', `${document.documentElement.clientHeight}px`);
}

I need this to get around the false vw and vh units in newer iOS Safari and Edge.

bundyo commented 7 years ago

I've updated to latest.

s-panferov commented 7 years ago

Our company is really suffering from this. What kind of help can we provide to speed up the merge?

jonathantneal commented 7 years ago

@s-panferov, I feel your pain. I’m the only person available to look at this right now, and I would like this as well. @ai, do I have the permissions to review, merge, and cut a new release?

Related; I think we need more collaborators, at least for these individual projects.

ai commented 7 years ago

@jonathantneal I have no permission to publish.

Why do you need so many reviews? :) This PR is simple. Release it :)

jonathantneal commented 7 years ago

Tests have passed.

Published as a minor update — 6.1.0 — as this adds functionality in a backwards-compatible manner.