Difference between the CSS and JSON file in a Qlik Sense Theme
Article Number: 000037794 | Last Modified: 2018/06/12
Many a times there has been question around the use of CSS and JSON file present in the Theme folder of Qlik Sense. Specially by the OEM customers. Since both the files are used to tweak themes, the confusion arises as in when to use which.
Json is currently used to manipulate non-css things, such as chart colors which are drawn using canvas. Css has been used for a few additional things outside of this, such as sheet backgrounds. We aim to make it work with only JSON, so that managing CSS selectors won't be necessary. However, We will continue to inject a CSS file for each theme. We just don't want that to be a necessity to adjust most settings. Currently we use the CSS to get the "cards" look in the example "sense-modern" theme that comes by default in the Themes folder of Qlik Sense. It adjusts things like paddings and add borders, which currently would be troublesome in JSON(as we need to translate in to css anyway). Long term plan is of course a theme editor or similar, so that most attributes can be changed without knowing css OR json.