Conversation
supportAwesome to see an update to this plugin! Entering this in a less file: clip-path: ~"url(#myClip)"; Results in: clip-path: url( https://example.com/wp-content/themes/theme/assets/css/#myClip ); Can this be fixed/changed please? This topic was modified 4 years, 8 months ago by woakley .
Hi @woakley What should myClip contain? Since it is in the URL, the ID is automatically pulled. If you want to store certain things in LESS, do you need to use variables or mixins? Greetings Kevin
Basically less shouldn’t process this at all, it should keep the value url(#myClip) and not add anything to it It’s not a file reference it’s just an ID.
@woakley I have now looked at the parser from wikimedia that is used for parsing LESS. I think it’s because your ID is matched with the following regex: /\\G#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/ So the value is parsed differently than it should. Have you tried this with an ID longer than 6 characters? WP-Less uses the libraries from wikimedia (since 1.9.0), so this is more a bug from there and not from WP-Less. Greetings Kevin Rel: https://github.com/wikimedia/less.php/blob/main/lib/Less/Parser.php#L1241
Thanks Kevin I will try asking them.
Hi @woakley What should myClip contain? Since it is in the URL, the ID is automatically pulled. If you want to store certain things in LESS, do you need to use variables or mixins? Greetings Kevin
Basically less shouldn’t process this at all, it should keep the value url(#myClip) and not add anything to it It’s not a file reference it’s just an ID.
@woakley I have now looked at the parser from wikimedia that is used for parsing LESS. I think it’s because your ID is matched with the following regex: /\\G#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/ So the value is parsed differently than it should. Have you tried this with an ID longer than 6 characters? WP-Less uses the libraries from wikimedia (since 1.9.0), so this is more a bug from there and not from WP-Less. Greetings Kevin Rel: https://github.com/wikimedia/less.php/blob/main/lib/Less/Parser.php#L1241
Thanks Kevin I will try asking them.