Closed sairamkiran9 closed 2 months ago
Yes, that's correct. If a user overrides a style for large screens, it should also override for small screens. So the container background should be '0 0 10px rgba(0,0,255,1)' on all screen sizes.
Your PR fixes this for elements where the media query is not used (e.g., the body in the example below), but not when the media query is used. So for this example:
const survey = new Survey({
styles: {
body: {
background: '#f0f8ff',
},
container: {
boxShadow: '0 0 10px rgba(0,0,255,1)',
'@media (max-width: 650px)': {
border: 'none',
}
}
}
});
All other styles should be the default styles in survey.js. Does that make sense?
@mdahardy sounds good! I'll update the changes as per the suggestions. Thanks!!
@mdahardy please review the updated changes. Thanks!!
@mdahardy thanks for reviewing the PR. Do you mean all the parent styles should be reflected in the nested and media styles? Before making changes to your comment, can you please share the expected merged style for the above input? From my understanding you are expecting the below as output for the media part?