How to modify CSS in apache-superset?

0

Issue

Recently I started working on Superset and I started to customise the frontend according to the requirement by replacing the superset logo with my own logo and also modified the CSS of Dashboard page(navbar color, height, width etc..) through edit css option and it worked well.

Now I want to change the CSS not only in Dashboard but in all pages of the superset like welcome page, login page etc.. . So I started by modify stylesheets which are present under folder

/Users/swastikn/superset/lib/python3.9/site-packages/superset/static/assets/stylesheets

But the changes that I made are not reflecting. So am I editing CSS in proper way? or Is it not possible to modify CSS in pages like welcome page, login page and some more pages other than Dashboard page

NOTE:

  1. superset version – 1.3.2
  2. Installed superset on python virtual environment
  3. I’m clearing browser cache just to make sure my browser to not use any old stylesheet files
  4. By saying welcome page I mean landing page with URL http://localhost:8088/superset/welcome/

Solution

If you install superset via pip / as a python library, it will only contain the compiled / post-build frontend assets (HTML, CSS, JS).

Superset is a multi-component web application, so most people end up deploying Superset through Docker. Then, you can patch part of the frontend codebase (which lives primarily in superset/superset-frontend (https://github.com/apache/superset/tree/master/superset-frontend).

Docker compose is a quick way to try out Superset with most of other components wired up: https://superset.apache.org/docs/installation/installing-superset-using-docker-compose

Answered By – Srini Kadamati

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More