@mixin a($acolor,$aline:none,$ahcolor:false,$ahline:none){
  color:$acolor;
  text-decoration:$aline;
  &:hover{
    @if $ahcolor{
      color:$ahcolor;
    }
    text-decoration:$ahline;
  }
}

@mixin p($indent:2em,$bottom:1.2em){
  word-wrap: break-word;
  -ms-word-wrap: break-word;
  //text-align: justify;
  text-justify: inter-ideograph;
  hyphens: auto;
  text-indent:$indent;
  margin-bottom:$bottom;
}

@mixin tap-highlight($color:rgba(#fff,.0)){
  -webkit-tap-highlight-color:$color;
}

@mixin square($long){
  width:#{$long}px;
  height:#{$long}px;
}

@mixin center($height,$align:center){
  height: $height;
  line-height: $height;
  @if $align{
    text-align: $align;
  }
}

@mixin bcenter($height,$width,$align:center){
  height: $height;
  line-height: $height;
  @if $width{
    width:$width;
  }
  @if $align{
    text-align: $align;
  }
}

@mixin pos($dir1:top,$x:0,$dir2:left,$y:0,$pos:absolute){
  position:$pos;
  #{$dir1}:$x;
  #{$dir2}:$y;
}

@mixin img-inset-shadow($radius:2px){
  &:after{
    content:'';
    display:block;
    width:100%;
    height:100%;
    box-shadow:inset 0 1px 3px rgba(#000,.15);
    @include pos();
    border-radius:$radius;
  }
  position:relative;
  @include in-bl;
}

@mixin circle($r,$deg,$x:$r,$y:$r){
  left:$x + $r*sin($deg);
  top:$y - $r*cos($deg);
}

@mixin webkit-cut($line:4){
  word-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
  display: -webkit-box;
  overflow: hidden;
}

@mixin parent3d(){
  overflow:visible!important;
  @include perspective(1000px);
  @include transform-style(preserve-3d);
}
