Coder Social home page Coder Social logo

Comments (7)

ceesvanegmond avatar ceesvanegmond commented on July 23, 2024

@deriknel Does it only not work on the latest release?

from minify.

amalfra avatar amalfra commented on July 23, 2024

I too get that. I think its issue with the cssmin library... How about using this : https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port

from minify.

ceesvanegmond avatar ceesvanegmond commented on July 23, 2024

@amalfra that isn't unfortunately an composer package. I don't have that problem with the @media entries. Could you give me som examples in code?

from minify.

amalfra avatar amalfra commented on July 23, 2024

@ceesvanegmond Oops, you are right.. I am not getting any issue now. But, i got some problem with @media some time before. I also, remember some problem with @font-face.. Did you get any with @font-face?

Oh, the YUI port isn't composer compatible. I didn't notice that.... How about packaging that class within?

from minify.

ceesvanegmond avatar ceesvanegmond commented on July 23, 2024

@amalfra @deriknel I don't have any problem with @font-face or @media. @deriknel Could you give an code example what goes wrong?

from minify.

deriknel avatar deriknel commented on July 23, 2024

In my CSS I'll have something like this:

@media(min-width:768px) {
#page-wrapper {
position: inherit;
margin: 0 0 0 250px;
padding: 0 30px;
min-height: 1300px;
border-left: 1px solid #e7e7e7;
}
}

Once it goes through the minify process, and I inspect my source, those entries would not be available anymore and the styling for the page would be all messed up. I am also getting this with @font-face entries. If I remove those files from the CSS minify process, and just add them to the page normally, they would render just fine and the layouts etc. would display as expected.

{{ HTML::style('/path/to/style.css') }}

I am currently using the latest version: "ceesvanegmond/minify": "2.0.*"

To add them to the page, I use: {{ Minify::stylesheeet(['/path/to/style.css']) }} with the list of files I would like to be minified. Should I be using a different method maybe?

from minify.

ceesvanegmond avatar ceesvanegmond commented on July 23, 2024

Hi, @deriknel,

@media(min-width:768px) {
    #page-wrapper {
        position: inherit;
        margin: 0 0 0 250px;
        padding: 0 30px;
        min-height: 1300px;
        border-left: 1px solid #e7e7e7;
    }
}

I don't know if that is valid CSS code. When i minify this piece of code, I get the same result as you do.
The way I know how it works is the following:

@media screen and (min-width: 768px) {
    #page-wrapper {
        position: inherit;
        margin: 0 0 0 250px;
        padding: 0 30px;
        min-height: 1300px;
        border-left: 1px solid #e7e7e7;
    }
}

When minifying this piece of code, the result is as expected. See http://webdesignerwall.com/tutorials/css3-media-queries for explanation.

from minify.

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.