I like the move to seperate icon classes since it covers the base
usecase. If you use more complex backgrounds like maybe background image
and color this may cause issues. Then again this should be very rare,
should the app dev just create a local copy inside the app?
Maybe a solution without breaking backwards compability would be to not
remove the feature but document the usage and available css classes
better and fix the core apps (some devs look at example source instead
of docs). This would improve performance loss (again if its not already
cached) to a bare minimum.
On 02/05/2014 06:49 PM, Jan-Christoph Borchardt wrote:
Heya app developers! :)
Currently apps can include icons from core in their CSS using
%webroot%. We need to remove this because of performance reasons and
will disable support for it in ownCloud 7. The alternative for this is
already in master in the form of a new CSS file: icons.css
https://github.com/owncloud/core/blob/master/core/css/icons.css
All the icons from core can be included in your apps now without any
additional CSS. To do that, you would use the classes .icon and
.icon-action
For example if you have a »Favorites« entry in the navigation of your
app, you would add the star icon by simply doing this:
<li class="icon icon-star">Favorites</li>
So now please remove everything containing %webroot% from your CSS and
switch to using the core classes in your HTML.
If you duplicated any icons from core into your app, please best also
change to using the icons from core.
Additionally, we will get rid of %appswebroot% as well. This was not
only bad for performance but also mostly useless: Apps generally used
it to reference themselves anyway.
If you for example have an app called »myfavoritesandwich« and in your
CSS you use »%appswebroot%/myfavoritesandwich/img/« you can just
replace that by »../img/«. No need to traverse all the way out of your
app.
And if you use %appswebroot% to include something from a different app
– stop that! Apps should be self-contained. ;)
Any questions?
_______________________________________________
Owncloud mailing list
Owncloud@kde.org
https://mail.kde.org/mailman/listinfo/owncloud
_______________________________________________
Owncloud mailing list
Owncloud@kde.org
https://mail.kde.org/mailman/listinfo/owncloud