diff options
author | friendica <info@friendica.com> | 2013-10-08 16:11:20 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-08 16:11:20 -0700 |
commit | 043042428ce7eea3daec258743349ff23c40b6e6 (patch) | |
tree | 12211165f3d6dee4d93257a3bfd50a52bd29280b /library/font_awesome/src/assets/font-awesome/scss | |
parent | e9c535f40a591ba9863543673fc91aa76e3a17ac (diff) | |
download | volse-hubzilla-043042428ce7eea3daec258743349ff23c40b6e6.tar.gz volse-hubzilla-043042428ce7eea3daec258743349ff23c40b6e6.tar.bz2 volse-hubzilla-043042428ce7eea3daec258743349ff23c40b6e6.zip |
add font_awesome
Diffstat (limited to 'library/font_awesome/src/assets/font-awesome/scss')
9 files changed, 469 insertions, 0 deletions
diff --git a/library/font_awesome/src/assets/font-awesome/scss/_bootstrap.scss b/library/font_awesome/src/assets/font-awesome/scss/_bootstrap.scss new file mode 100644 index 000000000..837d2df65 --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_bootstrap.scss @@ -0,0 +1,84 @@ +/* BOOTSTRAP SPECIFIC CLASSES + * -------------------------- */ + +/* Bootstrap 2.0 sprites.less reset */ +[class^="icon-"], +[class*=" icon-"] { + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} + +/* more sprites.less reset */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: none; +} + + +/* keeps Bootstrap styles with and without icons the same */ +.btn, .nav { + [class^="icon-"], + [class*=" icon-"] { + // display: inline; + &.icon-large { line-height: .9em; } + &.icon-spin { display: inline-block; } + } +} +.nav-tabs, .nav-pills { + [class^="icon-"], + [class*=" icon-"] { + &, &.icon-large { line-height: .9em; } + } +} +.btn { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .18em; } + } + &.icon-spin.icon-large { line-height: .8em; } + } +} +.btn.btn-small { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .25em; } + } + } +} +.btn.btn-large { + [class^="icon-"], + [class*=" icon-"] { + margin-top: 0; // overrides bootstrap default + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .05em; } + } + &.pull-left.icon-2x { margin-right: .2em; } + &.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/library/font_awesome/src/assets/font-awesome/scss/_core.scss b/library/font_awesome/src/assets/font-awesome/scss/_core.scss new file mode 100644 index 000000000..0189c73df --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_core.scss @@ -0,0 +1,129 @@ +/* FONT AWESOME CORE + * -------------------------- */ + +[class^="icon-"], +[class*=" icon-"] { + @include icon-FontAwesome(); +} + +[class^="icon-"]:before, +[class*=" icon-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} + +/* makes the font 33% larger relative to the icon container */ +.icon-large:before { + vertical-align: -10%; + font-size: (4em/3); +} + +/* makes sure icons active on rollover in links */ +a { + [class^="icon-"], + [class*=" icon-"] { + display: inline; + } +} + +/* increased font size for icon-large */ +[class^="icon-"], +[class*=" icon-"] { + &.icon-fixed-width { + display: inline-block; + width: (16em/14); + text-align: right; + padding-right: (4em/14); + &.icon-large { + width: (20em/14); + } + } +} + +.icons-ul { + margin-left: $icons-li-width; + list-style-type: none; + + > li { position: relative; } + + .icon-li { + position: absolute; + left: -$icons-li-width; + width: $icons-li-width; + text-align: center; + line-height: inherit; + } +} + +// allows usage of the hide class directly on font awesome icons +[class^="icon-"], +[class*=" icon-"] { + &.hide { + display: none; + } +} + +.icon-muted { color: $iconMuted; } +.icon-light { color: $iconLight; } +.icon-dark { color: $iconDark; } + +// Icon Borders +// ------------------------- + +.icon-border { + border: solid 1px $borderColor; + padding: .2em .25em .15em; + @include border-radius(3px); +} + +// Icon Sizes +// ------------------------- + +.icon-2x { + font-size: 2em; + &.icon-border { + border-width: 2px; + @include border-radius(4px); + } +} +.icon-3x { + font-size: 3em; + &.icon-border { + border-width: 3px; + @include border-radius(5px); + } +} +.icon-4x { + font-size: 4em; + &.icon-border { + border-width: 4px; + @include border-radius(6px); + } +} + +.icon-5x { + font-size: 5em; + &.icon-border { + border-width: 5px; + @include border-radius(7px); + } +} + + +// Floats & Margins +// ------------------------- + +// Quick floats +.pull-right { float: right; } +.pull-left { float: left; } + +[class^="icon-"], +[class*=" icon-"] { + &.pull-left { + margin-right: .3em; + } + &.pull-right { + margin-left: .3em; + } +} diff --git a/library/font_awesome/src/assets/font-awesome/scss/_extras.scss b/library/font_awesome/src/assets/font-awesome/scss/_extras.scss new file mode 100644 index 000000000..9a25845d8 --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_extras.scss @@ -0,0 +1,93 @@ +/* EXTRAS + * -------------------------- */ + +/* Stacked and layered icon */ +@include icon-stack(); + +/* Animated rotating icon */ +.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; +} + +/* Prevent stack and spinners from being taken inline when inside a link */ +a .icon-stack, +a .icon-spin { + display: inline-block; + text-decoration: none; +} + +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} + +/* Icon rotations and mirroring */ +.icon-rotate-90:before { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); +} + +.icon-rotate-180:before { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + transform: rotate(180deg); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); +} + +.icon-rotate-270:before { + -webkit-transform: rotate(270deg); + -moz-transform: rotate(270deg); + -ms-transform: rotate(270deg); + -o-transform: rotate(270deg); + transform: rotate(270deg); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); +} + +.icon-flip-horizontal:before { + -webkit-transform: scale(-1, 1); + -moz-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + -o-transform: scale(-1, 1); + transform: scale(-1, 1); +} + +.icon-flip-vertical:before { + -webkit-transform: scale(1, -1); + -moz-transform: scale(1, -1); + -ms-transform: scale(1, -1); + -o-transform: scale(1, -1); + transform: scale(1, -1); +} + +/* ensure rotation occurs inside anchor tags */ +a { + .icon-rotate-90, .icon-rotate-180, .icon-rotate-270, .icon-flip-horizontal, .icon-flip-vertical { + &:before { display: inline-block; } + } +} diff --git a/library/font_awesome/src/assets/font-awesome/scss/_icons.scss b/library/font_awesome/src/assets/font-awesome/scss/_icons.scss new file mode 100644 index 000000000..5febd993f --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_icons.scss @@ -0,0 +1,7 @@ +--- +--- +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + * readers do not read off random characters that represent icons */ +{% for icon in icons %}{% for alias in icon.aliases %} +.icon-{{ alias }}:before,{% endfor %} +.icon-{{ icon.id }}:before { content: ${{ icon.id }}; }{% endfor %} diff --git a/library/font_awesome/src/assets/font-awesome/scss/_mixins.scss b/library/font_awesome/src/assets/font-awesome/scss/_mixins.scss new file mode 100644 index 000000000..ca9c5931b --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_mixins.scss @@ -0,0 +1,48 @@ +// Mixins +// -------------------------- + +@mixin icon($icon) { + @include icon-FontAwesome(); + content: $icon; +} + +@mixin icon-FontAwesome() { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + *margin-right: .3em; // fixes ie7 issues +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + border-radius: $radius; +} + +@mixin icon-stack($width: 2em, $height: 2em, $top-font-size: 1em, $base-font-size: 2em) { + .icon-stack { + position: relative; + display: inline-block; + width: $width; + height: $height; + line-height: $width; + vertical-align: -35%; + [class^="icon-"], + [class*=" icon-"] { + display: block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; + font-size: $top-font-size; + line-height: inherit; + *line-height: $height; + } + .icon-stack-base { + font-size: $base-font-size; + *line-height: #{$height / $base-font-size}em; + } + } +} diff --git a/library/font_awesome/src/assets/font-awesome/scss/_path.scss b/library/font_awesome/src/assets/font-awesome/scss/_path.scss new file mode 100644 index 000000000..bb3f36b70 --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_path.scss @@ -0,0 +1,14 @@ +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: 'FontAwesome'; + src: url('#{$FontAwesomePath}/fontawesome-webfont.eot?v=#{$FontAwesomeVersion}'); + src: url('#{$FontAwesomePath}/fontawesome-webfont.eot?#iefix&v=#{$FontAwesomeVersion}') format('embedded-opentype'), + url('#{$FontAwesomePath}/fontawesome-webfont.woff?v=#{$FontAwesomeVersion}') format('woff'), + url('#{$FontAwesomePath}/fontawesome-webfont.ttf?v=#{$FontAwesomeVersion}') format('truetype'), + url('#{$FontAwesomePath}/fontawesome-webfont.svg#fontawesomeregular?v=#{$FontAwesomeVersion}') format('svg'); +// src: url('#{$FontAwesomePath}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; +} diff --git a/library/font_awesome/src/assets/font-awesome/scss/_variables.scss b/library/font_awesome/src/assets/font-awesome/scss/_variables.scss new file mode 100644 index 000000000..30bab220a --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/_variables.scss @@ -0,0 +1,16 @@ +--- +--- +// Variables +// -------------------------- + +$FontAwesomePath: "../font" !default; +$FontAwesomeVersion: "{{ site.fontawesome.version }}" !default; +$borderColor: #eeeeee !default; +$iconMuted: #eeeeee !default; +$iconLight: white !default; +$iconDark: #333333 !default; +$icons-li-width: (30em/14); + +{% for icon in icons %} +${{ icon.id }}: "\{{ icon.unicode }}"; +{% endfor %} diff --git a/library/font_awesome/src/assets/font-awesome/scss/font-awesome-ie7.scss b/library/font_awesome/src/assets/font-awesome/scss/font-awesome-ie7.scss new file mode 100644 index 000000000..3ba99da60 --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/font-awesome-ie7.scss @@ -0,0 +1,67 @@ +--- +--- +{% include license-code.less %} + +.icon-large { + font-size: (4em/3); + margin-top: -4px; + padding-top: 3px; + margin-bottom: -4px; + padding-bottom: 3px; + vertical-align: middle; +} + +.nav { + [class^="icon-"], + [class*=" icon-"] { + vertical-align: inherit; + margin-top: -4px; + padding-top: 3px; + margin-bottom: -4px; + padding-bottom: 3px; + &.icon-large { + vertical-align: -25%; + } + } +} + +.nav-pills, .nav-tabs { + [class^="icon-"], + [class*=" icon-"] { + &.icon-large { + line-height: .75em; + margin-top: -7px; + padding-top: 5px; + margin-bottom: -5px; + padding-bottom: 4px; + } + } +} + +.btn { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { vertical-align: inherit; } + &.icon-large { + margin-top: -.5em; + } + } +} + +a [class^="icon-"], +a [class*=" icon-"] { + cursor: pointer; +} + +@mixin ie7icon($inner) { *zoom: expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = '#{$inner}'); } + +{% for icon in icons %} +.icon-{{ icon.id }} { + @include ie7icon('&#x{{ icon.unicode }};'); +} +{% for alias in icon.aliases %} +.icon-{{ alias }} { + @include ie7icon('&#x{{ icon.unicode }};'); +} +{% endfor %} +{% endfor %} diff --git a/library/font_awesome/src/assets/font-awesome/scss/font-awesome.scss b/library/font_awesome/src/assets/font-awesome/scss/font-awesome.scss new file mode 100644 index 000000000..c7507de06 --- /dev/null +++ b/library/font_awesome/src/assets/font-awesome/scss/font-awesome.scss @@ -0,0 +1,11 @@ +--- +--- +{% include license-code.less %} + +@import "variables"; +@import "mixins"; +@import "path"; +@import "core"; +@import "bootstrap"; +@import "extras"; +@import "icons"; |