Skip to content
New issue

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

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

Already on GitHub? # to your account

Format function (%) doesn't support uppercase placeholders #386

Open
webberig opened this issue Mar 7, 2013 · 0 comments
Open

Format function (%) doesn't support uppercase placeholders #386

webberig opened this issue Mar 7, 2013 · 0 comments
Labels

Comments

@webberig
Copy link

webberig commented Mar 7, 2013

It appears that the lessphp implementation of the format function doesn't support uppercase placeholders.

Here's an example:

@color: #333333;
@url: %("../img/sprite_icons_%D.svg", @color);
background-image: (@url);

The (expected) output using less.js:

background-image: "../img/sprite_icons_%23333333.svg";

The output using lessphp

background-image: "../img/sprite_icons_#333333.svg";

As you can see, there is no difference between %d and %D while the less documentation states the following:

Use uppercase placeholders if you need to escape special characters into their utf-8 escape codes. The function escapes all special characters except ()'~!. Space is encoded as %20. Lowercase placeholders leave special characters as they are.

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

No branches or pull requests

2 participants