From dc0b9f5db46074462e7a5aa7eaa880aa35d321dc Mon Sep 17 00:00:00 2001 From: davegandy Date: Sat, 15 Jun 2013 09:22:23 -0400 Subject: [PATCH] addressing #1259 --- css/font-awesome.css | 5 +++++ css/font-awesome.min.css | 1 + less/bootstrap.less | 6 ++++++ scss/_bootstrap.scss | 6 ++++++ src/assets/font-awesome/less/bootstrap.less | 6 ++++++ src/assets/font-awesome/scss/_bootstrap.scss | 6 ++++++ src/test.html | 19 +++++++++++++++++++ 7 files changed, 49 insertions(+) diff --git a/css/font-awesome.css b/css/font-awesome.css index 0e5865444..33135d938 100644 --- a/css/font-awesome.css +++ b/css/font-awesome.css @@ -244,6 +244,11 @@ a [class*=" icon-"] { .btn.btn-large [class*=" icon-"].pull-right.icon-2x { margin-left: .2em; } +/* Fixes alignment in nav lists */ +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + line-height: inherit; +} /* EXTRAS * -------------------------- */ /* Stacked and layered icon */ diff --git a/css/font-awesome.min.css b/css/font-awesome.min.css index 5f959d386..902dc5f12 100644 --- a/css/font-awesome.min.css +++ b/css/font-awesome.min.css @@ -29,6 +29,7 @@ a [class^="icon-"],a [class*=" icon-"]{display:inline;} .btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0;}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em;} .btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em;} .btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em;} +.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{line-height:inherit;} .icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%;}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em;} .icon-stack .icon-stack-base{font-size:2em;*line-height:1em;} .icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;} diff --git a/less/bootstrap.less b/less/bootstrap.less index 444e29804..a2c96046b 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -76,3 +76,9 @@ &.pull-right.icon-2x { margin-left: .2em; } } } + +/* Fixes alignment in nav lists */ +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + line-height: inherit; +} diff --git a/scss/_bootstrap.scss b/scss/_bootstrap.scss index 43f8a2b89..837d2df65 100644 --- a/scss/_bootstrap.scss +++ b/scss/_bootstrap.scss @@ -76,3 +76,9 @@ &.pull-right.icon-2x { margin-left: .2em; } } } + +/* Fixes alignment in nav lists */ +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + line-height: inherit; +} diff --git a/src/assets/font-awesome/less/bootstrap.less b/src/assets/font-awesome/less/bootstrap.less index 444e29804..a2c96046b 100644 --- a/src/assets/font-awesome/less/bootstrap.less +++ b/src/assets/font-awesome/less/bootstrap.less @@ -76,3 +76,9 @@ &.pull-right.icon-2x { margin-left: .2em; } } } + +/* Fixes alignment in nav lists */ +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + line-height: inherit; +} diff --git a/src/assets/font-awesome/scss/_bootstrap.scss b/src/assets/font-awesome/scss/_bootstrap.scss index 43f8a2b89..837d2df65 100644 --- a/src/assets/font-awesome/scss/_bootstrap.scss +++ b/src/assets/font-awesome/scss/_bootstrap.scss @@ -76,3 +76,9 @@ &.pull-right.icon-2x { margin-left: .2em; } } } + +/* Fixes alignment in nav lists */ +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + line-height: inherit; +} diff --git a/src/test.html b/src/test.html index 35c65c65e..a0f9fc5f8 100644 --- a/src/test.html +++ b/src/test.html @@ -440,6 +440,25 @@ relative_path: ../
  • Nav Item 6
  • Nav Item 7
  • +

    Icons should be properly vertically aligned

    +
    + +
    +

    2x, 3x, 4x icons in text should have margins next to and below text