less.js icon indicating copy to clipboard operation
less.js copied to clipboard

allow image-size accept Url parameter

Open heroboy opened this issue 3 years ago • 0 comments

What: image-size, image-width, image-height can accept parameter like url(a.png)

Why: I can write code like

.xxx{
     background: url(a.png);
     width: image-width($background);
}

else I have to write:

@img: 'a.png'
.xxx{
     background: url(@img);
     width: image-width(@img);
}

How:

Checklist:

  • [x] Documentation
  • [x] Added/updated unit tests
  • [x] Code complete

heroboy avatar Nov 18 '22 02:11 heroboy