That was very circumstantial and took a long time to find and redefine each elemnt to display properly on Mobile Devices.
Since LESS has included the support of mixins, it is very comfortable to define such queries.
All you need is:
- Define your preferred Breakpoints as Variables
- Include the queries inside the main element
Step 1: Define your preferred Breakpoints as Variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extraSmall: ~"only screen and (max-width: 360px)"; | |
@small: ~"only screen and (max-width: 640px)"; | |
@medium: ~"only screen and (max-width: 768px)"; | |
@large: ~"only screen and (max-width: 960px)"; |
Step 2: Include the queries inside the main element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.menuWrapper { | |
position: relative; | |
width: 100%; | |
& .menu { | |
display: table; | |
margin: auto; | |
width: 70%; | |
@media @medium { | |
width: 90%; | |
} | |
@media @extraSmall { | |
width: 95%; | |
} | |
} | |
} |
No comments:
Post a Comment