oyejorge / less.php

less.js ported to PHP.
http://lessphp.typesettercms.com
Apache License 2.0
657 stars 2 forks source link

Parse error on CSS grid template with named lines or minmax function, but not both #359

Open Celti opened 6 years ago

Celti commented 6 years ago

This is a bit of a weird one. I'm building a CSS grid layout, starting with this bit of LESS:

#dokuwiki__site {
    display: grid;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    grid-template-rows:
        [header] 2em
        [content] 1fr
        [footer] 2em;
    grid-template-columns:
        [left] minmax(auto, min-content)
        [center] auto
        [right] minmax(auto, min-content);
    grid-gap: 1px;
}

That code gives a parse error on the grid-template-columns property. That parse error disappears if I remove either the grid line names, e.g.:

    grid-template-columns:
        [left] minmax(auto, min-content)
        [center] auto
        [right] minmax(auto, min-content);

...or if I remove the use of the CSS minmax() function, e.g.:

    grid-template-columns:
        [left] auto
        [center] auto
        [right] auto;

Neither option, of course, is quite what I want. less.js compiles all three just fine.

Michaelsy commented 6 years ago

A trick to insert (nearly) every unparsed code in LESSPHP: https://github.com/splitbrain/dokuwiki/issues/2254#issuecomment-386814503

Rainbow-Spike commented 4 years ago

~"screen CSS code from LESS parser"