Servoy 2020.03
We are implementing responsive design in our UI and are only using SVG icons (for scaling purposes in the response design). We have created multiple levels in our Media folder as follows to hold various SVG icons:
Media
----images
--------Icons
------------Menu
We are finding some very peculiar behavior getting the icons to display. For each icon, we created its own CSS class containing the following sample code:
.icon-name
{
content: url('../images/Icons/Menu/iconName.svg');
}
sideNav
For sideNav menu items, the iconStyleClass is set to the icon’s unique class name…but, the icon does not display.
Workaround: We moved the menu icons up one level to the ‘Icons’ folder, adjusted the content pathname, then the icons showed in the sideNav component.
Bootstrap Label and Button
Like the sideNav component, using the full media path does not find the icons using iconStyleClass for the buttons and StyleClass for the labels.
Workaround: We moved the icons to the ‘images’ folder…then, after adjusting the content pathname, the icons showed on the labels and buttons.
Also, sizing in the bootstrap labels and buttons work differently/inconsistently:
Labels: max-width: 50%; // has no effect on button
Buttons: width: 50%; // has no effect on label
And, the SVG images do not render in Developer but are displayed when the solution is run in a browser.
Has anyone else experienced this behavior? We have been unable to determine whether its us, the SVG icons, or the way the media folder is handled.