aboutsummaryrefslogtreecommitdiffstats
path: root/library/font_awesome/scss/_mixins.scss
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-30 15:02:45 -0700
committerredmatrix <git@macgirvin.com>2016-04-30 15:02:45 -0700
commit84d93cca6e2ac0b552a6f5c570fbcfce766200a1 (patch)
treea8a9c46ee6f70dd4b8824499a49b1e39e2980dc6 /library/font_awesome/scss/_mixins.scss
parent45512e6aba602604143e946cca49c363ae88aa1e (diff)
parent9446d0cbb463af6a256efebf97e10618469f1193 (diff)
downloadvolse-hubzilla-84d93cca6e2ac0b552a6f5c570fbcfce766200a1.tar.gz
volse-hubzilla-84d93cca6e2ac0b552a6f5c570fbcfce766200a1.tar.bz2
volse-hubzilla-84d93cca6e2ac0b552a6f5c570fbcfce766200a1.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'library/font_awesome/scss/_mixins.scss')
-rw-r--r--library/font_awesome/scss/_mixins.scss86
1 files changed, 49 insertions, 37 deletions
diff --git a/library/font_awesome/scss/_mixins.scss b/library/font_awesome/scss/_mixins.scss
index ca9c5931b..c3bbd5745 100644
--- a/library/font_awesome/scss/_mixins.scss
+++ b/library/font_awesome/scss/_mixins.scss
@@ -1,48 +1,60 @@
// Mixins
// --------------------------
-@mixin icon($icon) {
- @include icon-FontAwesome();
- content: $icon;
+@mixin fa-icon() {
+ display: inline-block;
+ font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
}
-@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 fa-icon-rotate($degrees, $rotation) {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})";
+ -webkit-transform: rotate($degrees);
+ -ms-transform: rotate($degrees);
+ transform: rotate($degrees);
+}
+
+@mixin fa-icon-flip($horiz, $vert, $rotation) {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)";
+ -webkit-transform: scale($horiz, $vert);
+ -ms-transform: scale($horiz, $vert);
+ transform: scale($horiz, $vert);
}
-@mixin border-radius($radius) {
- -webkit-border-radius: $radius;
- -moz-border-radius: $radius;
- border-radius: $radius;
+
+// Only display content to screen readers. A la Bootstrap 4.
+//
+// See: http://a11yproject.com/posts/how-to-hide-content/
+
+@mixin sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
}
-@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;
- }
+// Use in conjunction with .sr-only to only display content when it's focused.
+//
+// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
+//
+// Credit: HTML5 Boilerplate
+
+@mixin sr-only-focusable {
+ &:active,
+ &:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
}
}