File: _inline-block.scss

package info (click to toggle)
ruby-compass 1.0.3~dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,184 kB
  • ctags: 1,789
  • sloc: ruby: 12,904; makefile: 100; perl: 43; xml: 14; sh: 4
file content (31 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@import "compass/support";

// The legacy support for inline-block.
// Defaults to the $graceful-usage-threshold.
$inline-block-support-threshold: $graceful-usage-threshold !default;

// Set `$inline-block-alignment` to `none` or `false` to disable the output
// of a vertical-align property in the inline-block mixin.
// Or set it to a legal value for `vertical-align` to change the default.
$inline-block-alignment: middle !default;

// Provides a cross-browser method to implement `display: inline-block;`
@mixin inline-block($alignment: $inline-block-alignment, $ie-alignment: auto) {
  // legacy support for VERY old firefox
  @if support-legacy-browser("firefox", "2", $threshold: $inline-block-support-threshold) {
    display: -moz-inline-stack;
  }
  // standard
  display: inline-block;
  @if $alignment and $alignment != none {
    vertical-align: $alignment;
  }
  // legacy IE support
  @if support-legacy-browser("ie", "7", $threshold: $inline-block-support-threshold) {
    @if $ie-alignment and $ie-alignment != none {
      *vertical-align: $ie-alignment;
    }
    *zoom: 1;
    *display: inline;
  }
}