Coder Social home page Coder Social logo

Comments (8)

ghinda avatar ghinda commented on May 26, 2024

What file is it trying to minify?
Do you know what the MVC Bundler is using for minification? So I can test it on my end.

I would like to avoid including minified files, and rather fix the current dist/ files to work with any minifier.

from css-toggle-switch.

mtgibbs avatar mtgibbs commented on May 26, 2024

Thanks for your response.

That makes sense. The MVC bundler is its own implementation as far as I know. I tested minifying this with other tools available and it works, so it could be a problem with their implementation. Heck, it could be a problem with how they're concating the files. If you prefer to make it work with other minifiers, I'll take some time and see if I can make a repro project to make it easy to track down.

from css-toggle-switch.

ghinda avatar ghinda commented on May 26, 2024

I released a new version 4.0.3, built with a newer version of node-sass.
Can you check if you still get the error?

from css-toggle-switch.

mtgibbs avatar mtgibbs commented on May 26, 2024

Unfortunately the error is still occurring with 4.0.3.

/* Minification failed. Returning unminified contents.
(471,28): run-time error CSS1019: Unexpected token, found '}'
(481,1): run-time error CSS1019: Unexpected token, found '@-webkit-keyframes'
(482,8): run-time error CSS1035: Expected colon, found '{'
 */

So the error at least manifests in this block:

 /* trick to prevent the default checked ripple animation from showing
 * when the page loads.
 * the ripples are hidden by default, and shown only when the input is focused.
 */
  .switch-light.switch-material.switch-light input ~ span:before,
  .switch-light.switch-material.switch-light input ~ span:after,
  .switch-material.switch-toggle input + label:after {
    visibility: hidden; }
  .switch-light.switch-material.switch-light input:focus:checked ~ span:before,
  .switch-light.switch-material.switch-light input:focus:not(:checked) ~ span:after,
  .switch-material.switch-toggle input:focus:checked + label:after {
    visibility: visible; } }

/* Bugfix for older Webkit, including mobile Webkit. Adapted from
 * http://css-tricks.com/webkit-sibling-bug/
 */
@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 80em) {
  .switch-light,
  .switch-toggle {
    -webkit-animation: webkitSiblingBugfix infinite 1s; } }

@-webkit-keyframes webkitSiblingBugfix {
  from {
    -webkit-transform: translate3d(0, 0, 0); }
  to {
    -webkit-transform: translate3d(0, 0, 0); } }

Looking through this though, I don't see any of this as invalid, so their parser for MVC bundler is doing something weird, but I can't seem to get it to give me a better explanation or log right now.

from css-toggle-switch.

ghinda avatar ghinda commented on May 26, 2024

The issue seems to be in the BundlerMinifier extension. Somebody already reported it:
madskristensen/BundlerMinifier#282

I managed to minify dist/toggle-switch.css without any errors with csso, clean-css and yui-compressor.

from css-toggle-switch.

mtgibbs avatar mtgibbs commented on May 26, 2024

Thanks for doing the research into this. Seems like everything in the Microsoft space is messed up here. I'm closing this issue because, like you and I have tested, it works in every sane minifier and you don't want to keep and maintain pre-minified css files in your output.

from css-toggle-switch.

fikriisik avatar fikriisik commented on May 26, 2024

I get an error, when will the problem be solved?

So the error at least manifests in this block:

@-webkit-keyframes progress-bar-stripes {
from {
background-position: 1rem 0; }
to {
background-position: 0 0; } }

@Keyframes progress-bar-stripes {
from {
background-position: 1rem 0; }
to {
background-position: 0 0; } }

from css-toggle-switch.

ghinda avatar ghinda commented on May 26, 2024

If it's the same error, it's coming from the BundlerMinifier Visual Studio extension:
madskristensen/BundlerMinifier#282

There doesn't seem to be any activity on the upstream issue.

from css-toggle-switch.

Related Issues (20)

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.