Add support for a 'Tenant' css Tab in the Theme Style Sheet

On our radar

For multi-tenant applications it would be nice if there would be a tenant override of CSS possible, this would ease the implementation of tenant branding like logo, background, fonts and color usage.

Created on 8 Nov 2017
Comments (4)

Have you thought about how would a tenant change it? Is the tenant going to open Service Studio and change the CSS, then publish? Wouldn't that overwrite other tenants' styles?

I don't think most tenants would be willing to write CSS themselves - yes, I know it really depends on the application you are building. Wouldn't it be a better idea if you could have a backoffice that the tentant could change the logo and background image, and choose the primary color for your site? You could store those customisations in the database, and use an unescaped expression to inject CSS into your pages.

Yes we did implement such a solution where the tenant can chase those parameters, based on this article: https://www.outsystems.com/forums/discussion/11432/howto-change-css-depending-on-the-user-in-session/

For webapps this works fine, for mobile apps, we don't have this solution working yet.

Maybe the real change we would need is that the Theme Style sheet editor could support parameters that are substituted at runtime.

"Tenants" are run-time data, there is no way for Service Studio to be aware of them at design-time. That said, there are a number of different ways to do this, depending on your needs, and I think that any implementation is going to be too project-specific to build into Service Studio anyways.