less / less/less.js

data-uri svg output

Open
#3,610 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

Hi

According to http://lesscss.org/functions/ data-uri('image/svg+xml;charset=UTF-8', 'image.svg');should output url("data:image/svg+xml;charset=UTF-8,%3Csvg%3E%3Ccircle%20r%3D%229%22%2F%3E%3C%2Fsvg%3E");

Tested here https://codepen.io/ZeGregg/pen/RwoOqLG?editors=1100 and compiled css output background-image: url("https://getuikit.com/assets/uikit/src/images/icons/cloud-download.svg");

Any help would be appreciated
Greg

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodePen reproduction and compare its compiled CSS with the documented data-uri() example. Trace the data-uri SVG handling from the relevant Less entry point, then verify that SVG input produces the expected encoded data URI instead of an external URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.