Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error with CSS Grid Layout and named grid lines/areas #637

Open
Celti opened this issue Feb 23, 2018 · 3 comments
Open

Parse error with CSS Grid Layout and named grid lines/areas #637

Celti opened this issue Feb 23, 2018 · 3 comments

Comments

@Celti
Copy link

Celti commented Feb 23, 2018

When attempting to use named grid lines and areas in a LESS stylesheet I get a parse error from lessphp. less.js works just fine.

Fatal Error: parse error: failed at `grid-template-rows:` ../../lib/tpl/dokuwiki-template-grid/css/structure.less on line 12
#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;
}
@Michaelsy
Copy link

Michaelsy commented May 7, 2018

A trick to insert (nearly) every unparsed code in LESSPHP:
dokuwiki/dokuwiki#2254 (comment)

@blizzardengle
Copy link

blizzardengle commented Oct 23, 2018

I made a patch that is working. This protects CSS grid names automatically for you and should allow for variables to be used in the statement if needed; I have not tested if variables work.

It's not elegant but it works: Pull Request #643

@Rainbow-Spike
Copy link

~"screen CSS code from LESS parser"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants