1 // element-invisible as defined by http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
2 @mixin element-invisible {
3 position: absolute !important;
7 @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
8 clip: rect(1px 1px 1px 1px); // IE6 and IE7 use the wrong syntax.
10 clip: rect(1px, 1px, 1px, 1px);
13 // Turns off the element-invisible effect.
14 @mixin element-invisible-off {
15 position: static !important;
22 @mixin element-focusable {
23 @include element-invisible;
26 @include element-invisible-off;
30 @mixin display-flex() {
31 display: -webkit-box; // Old Safari :(
32 display: -webkit-flex;
39 @mixin display-inline-flex() {
40 display: -webkit-inline-flex;
41 display: -moz-inline-flex;
42 display: -ms-inline-flex;
43 display: -o-inline-flex;
48 -webkit-box-flex: $val; // Old Safari :(
56 @mixin justify-content($val: center) {
57 -webkit-box-pack: 1; // Old Safari :( TODO: don't hardcode 1.
58 -webkit-justify-content: $val;
59 -moz-justify-content: $val;
60 -ms-justify-content: $val;
61 -o-justify-content: $val;
62 justify-content: $val;
65 @mixin align-items($val: center) {
66 -webkit-box-align: $val; // Old Safari :(
67 -webkit-align-items: $val;
68 -moz-align-items: $val;
69 -ms-align-items: $val;
74 @mixin align-self($val: center) {
75 -webkit-align-self: $val;
76 -moz-align-self: $val;
82 @mixin flex-direction($val) {
83 -webkit-box-orient: vertical; // Old Safari :(. TODO: don't hardcode "vertical".
84 -webkit-flex-direction: $val;
85 -moz-flex-direction: $val;
86 -ms-flex-direction: $val;
87 -o-flex-direction: $val;
91 @mixin flex-wrap($val: nowrap) {
92 -webkit-flex-wrap: $val;
100 -webkit-box-ordinal-group: $val; // Old Safari :(
108 // @mixin width-max-content() {
109 // width: -webkit-max-content;
110 // width: -moz-max-c;
111 // width: -ms-max-content;
112 // width: -o-max-content;
113 // width: max-content;
116 // @mixin width-min-content() {
117 // width: -webkit-min-content;
118 // width: -moz-min-content;
119 // width: -ms-min-content;
120 // width: -o-min-content;
121 // width: min-content;
124 @mixin user-select($val: none) {
125 -webkit-user-select: $val;
126 -moz-user-select: $val;
127 -o-user-select: $val;
128 -ms-user-select: $val;
132 @mixin calc($property, $expression) {
133 #{$property}: -moz-calc(#{$expression});
134 #{$property}: -o-calc(#{$expression});
135 #{$property}: -webkit-calc(#{$expression});
136 #{$property}: calc(#{$expression});
139 @mixin filter($val: none) {
140 -webkit-filter: $val;