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

CSS compilation fails with multiple filters #2860

Closed
trailjeep opened this issue Sep 16, 2019 · 1 comment
Closed

CSS compilation fails with multiple filters #2860

trailjeep opened this issue Sep 16, 2019 · 1 comment

Comments

@trailjeep
Copy link

trailjeep commented Sep 16, 2019

I found a way to make code blocks look nice in dark templates, but,
adding:

pre.code span {
    -webkit-filter: invert(100%) contrast(75%);
    filter: invert(100%) contrast(75%);
}

results in ths error:

A fatal error occured during compilation of the CSS files. If you recently installed a new plugin or template it might be broken and you should try disabling it again. [expected color value: failed at `-webkit-filter: invert(100%) contrast(75%);` in /conf/userall.css at line 3]

The CSS works fine in Chrome dev tools and is valid according to: CSS filter Property

Tip: To use multiple filters, separate each filter with a space (See "More Examples" below).

This does not seem related to #2517 as Configuration Setting: compress has no effect.

@phy25
Copy link
Collaborator

phy25 commented Sep 17, 2019

contrast is a less function which accepts first argument as color. LESS statements are parsed in .css and in .less files in DokuWiki. You are seeing an expected behavior.

You may want to use:

pre.code span {
    -webkit-filter:  ~"invert(100%) contrast(75%)";
    filter: ~"invert(100%) contrast(75%)";
}

References:

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

No branches or pull requests

2 participants