Closed SamMousa closed 8 months ago
Hi @SamMousa, Thank you for pointing this out. An HTML question appears well in all themes except for the Contrast theme. I passed this issue to our developers for further research. https://plnkr.co/edit/MBbw3CJa8j9QMccQ Thanks
Are you requesting a feature, reporting a bug or asking a question?
I think it's a bug
What is the current behavior?
Currently the element for an HTML question looks like this (knockout):
This works well, unless you use one of the new dark themes.
What is the expected behavior?
The default CSS should make it so that colors are configured properly also for an HTML question. If the user explicitly adds CSS inside the HTML question it is their responsibility, but if they just add simple tags or text it should work.
This is what it looks like:
This is what it should look like (imo):
How would you reproduce the current behavior (if this is a bug)?
Go to the page below and copy the code below. Then go to the Themes tab and pick a dark theme.
Provide the test code and the tested page URL (if applicable)
Tested page URL: https://surveyjs.io/create-free-survey
Test code
Solution
While I realize that the point of the HTML question type is to have a flexible point of integrating custom HTML, I think the defaults should be sane. There is no way for someone defining the survey to know what theme will be used and if at all possible coupling between survey design and theme design should be minimal.
A clean approach, in my opinion, would be to add the class
sd-element--with-frame
to the question root div. Alternatively extra css could be added to.sd-question--html
so that default foreground and background colors are set.We should agree on how usable it should be with standard content. For example, should it look good in the default themes when the HTML content is this:
I believe it should, and it can easily be realized.
Specify your