I'm trying to define my mobile support matrix in one place using less
.
I also looked at examples from this StackOverflow question.
Approach 1: Not working
@my-device-min-width: 375px;
@my-device-max-width: 414px;
@my-device-orientation: portrait;
@phoneRules: ~"only screen and (min-width: {@device-min-width}) and (max-width: {@device-max-width}) and (orientation: {@device-orientation})";
Approach 2: Not working
@my-device-min-width: {min-width: 375px;};
@my-device-max-width: {max-width: 414px;};
@my-device-orientation: {orientation:portrait;};
@phoneRules: only screen and (@device-min-width) and (@device-max-width) and (@device-orientation);
Please provide some explanation along with an answer to help me understand it better.