Question T1372
Visible to All Users

Angular 2+: integrating SCSS theme file into SurveyJS

created 6 years ago (modified 6 years ago)

Hello Support Team,

We have a product of which the entire styles colours system is pulled from two palettes. Is there a way to tie this in to SurveyJS's styles? There is no way to easily import the base colours into the typescript file used by SurveyJS and then assign them to defaultThemeColors["$primary-color"] etc - is there some kind of 'global' css/scss value that I could override to point to our palette variables?

Kind Regards

Comments (1)

    Hello,

    You can recompile this file this file - https://github.com/surveyjs/surveyjs/blob/master/src/main.scss#L59-L71 (here you can find global SCSS variables)
    Probably you will need to set more specific selector here - https://github.com/surveyjs/surveyjs/blob/master/src/main.scss#L91
    to overcome the default theme.
    Thus you can generate your own styles file for SurveyJS.

    Thanks, Serge
    SurveyJS Team