Responsive Typography Mixin for Bootstrap 3.x

You can set up fully responsive bootstrap typography with the following code. You have to be rolling your own bootstrap based on the less files for this to work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@xxs: ~'max-width: 377px';
@xs: ~'max-width: @{screen-xs-max}';
@sm: ~'max-width: @{screen-sm-max}';
@md: ~'max-width: @{screen-md-max}';
.bs3-responsive-type(@mq, @font-size-base, @mq-size-percentage) {
@media(@mq) {
@font-size-large: ceil((@font-size-base * 1.25) * @mq-size-percentage);
@font-size-small: ceil((@font-size-base * 0.85) * @mq-size-percentage);
@font-size-h1: floor((@font-size-base * 2.6) * @mq-size-percentage);
@font-size-h2: floor((@font-size-base * 2.15) * @mq-size-percentage);
@font-size-h3: ceil((@font-size-base * 1.7) * @mq-size-percentage);
@font-size-h4: ceil((@font-size-base * 1.25) * @mq-size-percentage);
@font-size-h5: @font-size-base;
@font-size-h6: ceil((@font-size-base * 0.85) * @mq-size-percentage);
@import (multiple) "../../../hoverboard/bower_components/bootstrap/less/scaffolding.less";
@import (multiple) "../../../hoverboard/bower_components/bootstrap/less/type.less";
}
}
.bs3-responsive-type(@sm, 16px, 0.9);
.bs3-responsive-type(@xs, 15px, 0.85);
.bs3-responsive-type(@xxs, 14px, 0.8);



Note: I set up my media queries to be based on max-width, even though bootstrap is mobile first. I haven’t been working with mobile first for a while now so I’m confortable with this method. If you want to set up your media queries for mobile first, change all the “max”s to “min”s like so:

1
2
3
4
@xxs: ~'min-width: 377px';
@xs: ~'min-width: @{screen-xs-min}';
@sm: ~'min-width: @{screen-sm-min}';
@md: ~'min-width: @{screen-md-min}';

Dead Simple Bootstrap LESS Media Query Mixins for Responsive Layouts

I’ve been hunting down a solution to this for a while, and as it turns out, it was right under my nose the whole time.

LESS supports media query “bubbling”; this is a fancy term for throwing the media queries outside of the declaration. I took that concept and combined it with Bootstrap 3.0‘s breakpoints from variables.less:

1
2
3
4
@xxs: ~'max-width: 377px';
@xs: ~'max-width: @{screen-xs-max}';
@sm: ~'max-width: @{screen-sm-max}';
@md: ~'max-width: @{screen-md-max}';

Then, I simply throw this in wherever I need to adjust for screen size:

1
2
3
4
5
6
7
8
9
10
11
12
#dat-element {
...
@media(@xs) {
...
}
@media(@sm) {
...
}
@media(@md) {
...
}
}

Before anyone gets all crazy up in the comments, I know there are many ways to accomplish this. I prefer this way since it’s easy to remember the syntax and simple to use.

That’s the end of today’s lesson. Shout out to Jason Lengstorf for helping me formulate this little snippet of awesome.


Note: I set up my media queries to be based on max-width, even though bootstrap is mobile first. I haven’t been working with mobile first for a while now so I’m confortable with this method. If you want to set up your media queries for mobile first, change all the “max”s to “min”s like so:

1
2
3
4
@xxs: ~'min-width: 377px';
@xs: ~'min-width: @{screen-xs-min}';
@sm: ~'min-width: @{screen-sm-min}';
@md: ~'min-width: @{screen-md-min}';

Sweet Brown - Ain't Nobody Got Time For That - Ringtones / Text Tones for iOS

Hi everybody! I made you a present! That’s right, finally some Sweet Brown “Ain’t Nobody Got Time For That” Ringtones / Text Tones for iOS. Just download the zip file and add the tones to iTunes and then add them to your phone.

The ringtones will automatically be added to the “Tones” library in iTunes. You can then sync them to your iPhone as a ringtone or text tone.

Files included:

  • aint nobody got time for that.m4r
  • barbecuin.m4r
  • co pop.m4r
  • i didnt grab no shoes or nothin jesus.m4r
  • i got bronchitis.m4r oh lorr jesus iss a fire.m4r

Download link: aint-nobody-got-time-for-that-ringtones

Original Video: