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

the output of marker-end: url(#ID) is incorrect in some case. #205

Open
benZhai01 opened this issue Jan 13, 2022 · 3 comments
Open

the output of marker-end: url(#ID) is incorrect in some case. #205

benZhai01 opened this issue Jan 13, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@benZhai01
Copy link

benZhai01 commented Jan 13, 2022

Hi team,

if I use marker-end: url(#ID) in less, it's resolved as url link and output the css like marker-end: url("../base/#ID").
here is doc of marker-end: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-end

I think using webpack + less-loader doesn't have the issue.
So do you any workaround to solve it in consumer side?

Best Regards
Ben

@matz3
Copy link
Member

matz3 commented Jan 14, 2022

This is due to the default of relativeUrls: true (see https://github.com/SAP/less-openui5#parser) which rewrites all URLs relative to the file where they are defined, in order to support relative references to files such as images.

It seems that at least the less version we use (v1.6.3) doesn't handle such a case to leave the url untouched.

A workaround would be to put those CSS rules in a separate CSS file and import it via @import "styles.css"; so that it won't be processed by less. However, this will result into an additional request as a CSS import statement is use to load the file at runtime.

@matz3 matz3 added the bug Something isn't working label Jan 14, 2022
@benZhai01
Copy link
Author

hi @matz3 , thanks for responsing, the workaround you provided works.

@matz3 matz3 self-assigned this Jan 19, 2022
@matz3
Copy link
Member

matz3 commented Jan 19, 2022

Glad to hear 👍🏻

I'm keeping this issue open but don't think that there will be a solution other than the workaround any time (soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants