2

I am trying to implement responsive text using media queries in bootstrap 3.

Sample "mystyles.less" media queries for less:

@media (min-width: @screen-sm-min) {
 @font-size-base:10px; 
}
@media (min-width: @screen-md-min) {
@font-size-base:12px;     
}
@media (min-width: @screen-lg-min) {
@font-size-base:14px;
}

now when i add "mystyles.less" to "bootstrap.less" like this:

.
.
.
@import "variables.less";
@import "responsive-fontsize.less"; 
.
.
.

now nothing is happening, font sizes are not responsive. Any idea about problem ?

Andrew
  • 1,963
  • 3
  • 25
  • 35
user3458678
  • 51
  • 1
  • 4
  • media queries are evaluated by the browser so Less variables defined in a media query can't have any effect outside of that media block. See http://stackoverflow.com/a/15932603/2712740 for more details. – seven-phases-max May 28 '14 at 00:59
  • possible duplicate of [css, change less variable with @media](http://stackoverflow.com/questions/15927805/css-change-less-variable-with-media) – seven-phases-max May 28 '14 at 01:03

0 Answers0