/** * Mixin * * @author splitfire - http://splitfire.fr * @version 1.0 * */ /* Mixin by Compass -------------------- */ @import "compass/css3/transition"; @import "compass/css3/box-shadow"; @import "compass/css3/border-radius"; @import "compass/css3/transform"; @import "compass/css3/images"; @import "compass/css3/user-interface"; @import "compass/typography/text/replacement"; @import "compass/css3/opacity"; @import "compass/css3/box-sizing"; @import "compass/utilities/sprites/sprite-img"; @import "compass/utilities/sprites/base"; @import "compass/support"; @import "compass/css3/font-face"; /* Mixin by Splitfire ----------------------- */ @mixin backface($state) { -webkit-backface-visibility: $state; -moz-backface-visibility: $state; -ms-backface-visibility: $state; backface-visibility: $state; } @mixin transform-style($value) { -webkit-transform-style: $value; -moz-transform-style: $value; -ms-transform-style: $value; transform-style: $value; } /** * Gestion des background-color en rgba */ @mixin background-color-rgba($color, $opacity) { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$opacity * 100}); filter:alpha(opacity=#{$opacity * 100}); zoom:1; background-color: $color; background-color: rgba($color, $opacity); } /** * Gestion des césures sur des parapgraphes */ @mixin text() { word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; -o-hyphens: auto; hyphens: auto; } /** * hack pour le inline-block */ @mixin inline-block() { display:inline-block; *display:inline; *zoom:1; } /** * Compatilité d'ie8 avec l'opacity */ @mixin opacity($opacity) { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$opacity * 100}); opacity: $opacity ; zoom: 1; } /** * Empeche la selection */ @mixin unselectable() { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } /** * Alias vers le mixin after-before() */ @mixin after() { @include after-before($pseudo-element : 'after', $type: 'table'); } /** * Alias vers le mixin after-before() */ @mixin before() { @include after-before($pseudo-element : 'before', $type: 'table'); } /** * Mixin pour gérer la pseudo classe :after et :before * @param string type du pseudo éléments * @param string type du display * @return html */ @mixin after-before($pseudo-element : 'after', $type: 'block') { @if ($pseudo-element == 'after') { &:after { display: unquote($type); content: ""; clear: both; @content; } } @else if ($pseudo-element == 'before') { &:before { display: unquote($type); content: ""; clear: both; @content; } } } /** * Create css class for timeline icon * @param string class * @param string icon */ @mixin add-icon($class, $icon) { $icon : unquote(#{$icon}); &.#{$class}:before { content: "#{$icon}"; } }