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

PHP port of the LESS fails to compile colors.less #1832

Closed
cmoeke opened this issue Jan 8, 2021 · 1 comment
Closed

PHP port of the LESS fails to compile colors.less #1832

cmoeke opened this issue Jan 8, 2021 · 1 comment
Labels
lang/css Anything involving CSS type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@cmoeke
Copy link
Contributor

cmoeke commented Jan 8, 2021

Bug Report

Currently it's not possible to compile the less files with the wikimedia PHP port of the LESS processor.

The problem is that the PHP port requires a semicolon after each variable declaration. So it currently fails at the colors.less.

I know it's a bug of the wikimedia PHP port and i also will create an issue there, but it seems that they do not have the will to fix community errors.

So it would help me a lot if we could make this small adjustment.

Steps to reproduce

  1. Install a fixed version of https://github.com/wikimedia/less.php/ (Fix @import statements with variables wikimedia/less.php#33 due to a other bug)
  2. Run /usr/bin/php vendor/wikimedia/less.php/bin/lessc '##FOMANTIC_PATH##/definitions/modules/accordion.less' > '##TARGET_PATH##/definitions/modules/accordion.css'

Actual result

fail

Way to fix

Add a semicolon to:



Old:

    isDark         : true;
    isVeryDark     : true;
  };
}

New:

    isDark         : true;
    isVeryDark     : true;
  };
};

Version

2.8.7

@cmoeke cmoeke added state/awaiting-investigation Anything which needs more investigation state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/bug Any issue which is a bug or PR which fixes a bug labels Jan 8, 2021
cmoeke added a commit to cmoeke/Fomantic-UI that referenced this issue Jan 8, 2021
Fixed fomantic#1832 by adding semicolons after variable declarations
@lubber-de lubber-de added lang/css Anything involving CSS state/has-pr An issue which has a related PR open and removed state/awaiting-investigation Anything which needs more investigation state/awaiting-triage Any issues or pull requests which haven't yet been triaged labels Jan 8, 2021
@lubber-de lubber-de added this to the 2.8.8 milestone Jan 8, 2021
@lubber-de lubber-de added tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build and removed state/has-pr An issue which has a related PR open labels Jan 8, 2021
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Aug 8, 2021
@mvorisek
Copy link
Contributor

mvorisek commented Dec 9, 2022

@cmoeke is there a wikimedia/less.php issue for it or can you please open a new issue there?

lubber-de pushed a commit that referenced this issue Dec 21, 2022
Compared to Stylelint, Prettier is very simple tool and I am quite supprised Stylelint is deprecating the whitespace rules in favor of Prettier. For LESS it seems ok, for JS, we should never enable Prettier as formatting is part of a code and improves readability.

As Prettier is an opinionated formatter instead of an linter, we need to satisfy it everywhere without exceptions.

When I was crafting this PR, I found several Prettier issues and proposed changes to Prettier:

Fix semicolon duplicated at the end of LESS file prettier/prettier#14007
Fix no space after unary minus when followed by opening parenthesis in LESS prettier/prettier#14008
Do not change case of property name if inside a variable declaration in LESS prettier/prettier#14034
In this PR, these changes are contained and Prettier is patched before it is run. Once the changes are merged in prettier and stable release is made, they can be removed.

This PR fixes minor whitespaces unfixed/undetected in GH-2610.

And also asserts:

PHP port of the LESS fails to compile colors.less #1832
feat(lint): add stylelint overrides and variation files #2593 (comment)
Prettier has no built in support to dump the diff - prettier/prettier#6885 - so we dump it in the CI using git.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants