Closed Belar closed 1 month ago
Hi, I encountered an issue with the select when using it in a plugin.
Select's chevron icon is missing when used in a plugin with the plugin-styles package.
plugin-styles
<div class="form-group"> <label class="select-label-hidden" for="select-1">Which is your favourite animal?</label> <select class="select" id="select-1"> <option value="1">Quokka</option> <option value="2">Rabbit</option> <option value="3">Goat</option> <option value="4">Capybara</option> </select> </div>
The chevron icon should be visible in the select input.
In the build script for plugin-styles, 'text' loader is handling the processing of SVGs https://github.com/penpot/penpot-plugins/blob/cc6b9e58945bed9e00be61f219682a8ad331d3d7/libs/plugins-styles/src/lib/components/select.css#L3-L5 https://github.com/penpot/penpot-plugins/blob/cc6b9e58945bed9e00be61f219682a8ad331d3d7/tools/scripts/build-css.mjs#L17-L19 and builds them to a url with plain text base64.
'text'
url
Changing the loader to 'dataurl’ fixes the issue, it builds to a media url.
'dataurl’
Thanks! You were right about the fix
Hi, I encountered an issue with the select when using it in a plugin.
Issue:
Select's chevron icon is missing when used in a plugin with the
plugin-styles
package.Reproduction steps:
Expected behaviour:
The chevron icon should be visible in the select input.
Potential fix:
In the build script for
plugin-styles
,'text'
loader is handling the processing of SVGs https://github.com/penpot/penpot-plugins/blob/cc6b9e58945bed9e00be61f219682a8ad331d3d7/libs/plugins-styles/src/lib/components/select.css#L3-L5 https://github.com/penpot/penpot-plugins/blob/cc6b9e58945bed9e00be61f219682a8ad331d3d7/tools/scripts/build-css.mjs#L17-L19 and builds them to aurl
with plain text base64.Changing the loader to
'dataurl’
fixes the issue, it builds to a mediaurl
.