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

LessCompiler variables with color #4523

Closed
SebastiaanKloos opened this issue Aug 5, 2019 · 22 comments
Closed

LessCompiler variables with color #4523

SebastiaanKloos opened this issue Aug 5, 2019 · 22 comments

Comments

@SebastiaanKloos
Copy link
Contributor

  • OctoberCMS Build: 457
  • PHP Version: 7.2.19

Description:

CleanShot 2019-08-05 at 21 30 52

Is converted by the LessCompiler to the following:

CleanShot 2019-08-05 at 21 31 00

Steps To Reproduce:

Create a theme with options to add a font. Use the variable in your less file.

@SebastiaanKloos
Copy link
Contributor Author

OctoberCMS uses the oyejorge/less.php library. I found out the core of the issue. I've created a new issues here oyejorge/less.php#376. I will report back when fixed.

@Samuell1
Copy link
Member

Samuell1 commented Aug 11, 2019

@SebastiaanKloos oyejorge/less.php#371

I think only way to fix that is to make fork of it or find new package

@LukeTowers
Copy link
Contributor

There's also https://github.com/leafo/lessphp, which I think Assetic uses. As far as I was aware that was the library we were using, but I guess not?

@LukeTowers
Copy link
Contributor

Plus October will be taking over Assetic FYI

@github-actions
Copy link

github-actions bot commented Oct 1, 2019

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

@LukeTowers
Copy link
Contributor

@jaxwilko can you take a look at this? How can we fix this with our Assetic takeover?

@jaxwilko
Copy link

jaxwilko commented Oct 2, 2019

@LukeTowers I shall take a look and see what's possible

@LukeTowers LukeTowers added this to the v1.0.466 milestone Apr 5, 2020
@LukeTowers
Copy link
Contributor

@SebastiaanKloos can you verify that this is still an issue in the Laravel 6 branch of October?

@SebastiaanKloos
Copy link
Contributor Author

@LukeTowers I'll add it to my tasklist for this week

@SebastiaanKloos
Copy link
Contributor Author

@LukeTowers Nope still the same:

li {
  font-family: #ff0000 Hat Display;
}

@bennothommo
Copy link
Contributor

@SebastiaanKloos how have you defined the asset variable in the LESS file?

@multiwebinc
Copy link
Contributor

Just FYI, the Less.php repo has now been archived, and the author recommends Wikimedia's fork:

Less.php
This project is no longer being updated. See Wikimedia's repo for a well-maintained fork.

@LukeTowers
Copy link
Contributor

@multiwebinc we are using the wikimedia fork in the L6 branch

@SebastiaanKloos
Copy link
Contributor Author

SebastiaanKloos commented May 21, 2020

@SebastiaanKloos how have you defined the asset variable in the LESS file?

li {
  font-family: @primary-font;
}

@LukeTowers
Copy link
Contributor

@SebastiaanKloos FYI, it's ` (a backtick) not ' (a single quote) for code formatting on github.

@bennothommo
Copy link
Contributor

@SebastiaanKloos have you tried using one of the escaping functions in LESS? http://lesscss.org/functions/#string-functions

@SebastiaanKloos
Copy link
Contributor Author

SebastiaanKloos commented May 22, 2020

@SebastiaanKloos FYI, it's ` (a backtick) not ' (a single quote) for code formatting on github.

@LukeTowers Yeah I know. Couldn’t find it on my iOS keyboard... 🙈

Update: found it. You should hold the single quote, it gives you the option to typ a backtick

@SebastiaanKloos
Copy link
Contributor Author

@SebastiaanKloos have you tried using one of the escaping functions in LESS? http://lesscss.org/functions/#string-functions

I’ll try the escaping functions!

@SebastiaanKloos
Copy link
Contributor Author

Nope didn't work @bennothommo... I think it has to do with it being a variable.

@LukeTowers
Copy link
Contributor

@SebastiaanKloos did you submit an issue to the wikimedia Less library that the Laravel 6 branch is now using?

@LukeTowers LukeTowers modified the milestones: v1.0.466, v1.0.467 May 26, 2020
@SebastiaanKloos
Copy link
Contributor Author

@LukeTowers Not yet. I will submit an issue to the wikimedia Less library soon.

@bennothommo bennothommo modified the milestones: v1.0.468, v1.0.469 Jul 29, 2020
@LukeTowers LukeTowers modified the milestones: v1.1.0, Pending Features Sep 4, 2020
@daftspunk
Copy link
Member

Yes, please take this up with the https://github.com/wikimedia/less.php team as it is nothing to do with October CMS. You'll need to ask for some way to escape the "color name to hex" conversion. In the meantime, you could always just rename your font. Hope this helps!

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

No branches or pull requests

8 participants