Sha256: ef6ba6a1f28ac910bc99d3e0c7207c0faf50402656405bccce4ff0f82be64c7e

Contents?: true

Size: 1.46 KB

Versions: 19

Compression:

Stored size: 1.46 KB

Contents

module Compass::SassExtensions::Functions::Display
  DEFAULT_DISPLAY = {
    :block => %w{address article aside blockquote center dir div dd details dl dt fieldset
                  figcaption figure form footer frameset h1 h2 h3 h4 h5 h6 hr header hgroup
                  isindex menu nav noframes noscript ol p pre section summary ul},
    :inline => %w{a abbr acronym audio b basefont bdo big br canvas cite code command
                  datalist dfn em embed font i img input keygen kbd label mark meter output
                  progress q rp rt ruby s samp select small span strike strong sub
                  sup textarea time tt u var video wbr},
    :"inline-block" => %w{img},
    :table => %w{table},
    :"list-item" => %w{li},
    :"table-row-group" => %w{tbody},
    :"table-header-group" => %w{thead},
    :"table-footer-group" => %w{tfoot},
    :"table-row" => %w{tr},
    :"table-cell" => %w{th td},
    :"html5-block" => %w{article aside details figcaption figure footer header hgroup menu nav section summary},
    :"html5-inline" => %w{audio canvas command datalist embed keygen mark meter output progress rp rt ruby time video wbr},
  }
  DEFAULT_DISPLAY[:html5] = (DEFAULT_DISPLAY[:"html5-block"] + DEFAULT_DISPLAY[:"html5-inline"]).sort
  # returns a comma delimited string for all the
  # elements according to their default css3 display value.
  def elements_of_type(display)
    Sass::Script::String.new(DEFAULT_DISPLAY.fetch(display.value.to_sym).join(", "))
  end
end

Version data entries

19 entries across 18 versions & 3 rubygems

Version Path
compass-0.12.7 lib/compass/sass_extensions/functions/display.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/compass-0.12.3/lib/compass/sass_extensions/functions/display.rb
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/compass-0.12.3/lib/compass/sass_extensions/functions/display.rb
compass-0.12.6 lib/compass/sass_extensions/functions/display.rb
compass-0.12.5 lib/compass/sass_extensions/functions/display.rb
compass-0.12.4 lib/compass/sass_extensions/functions/display.rb
compass-0.12.3 lib/compass/sass_extensions/functions/display.rb
compass-sourcemaps-0.12.4.sourcemaps.a4836f1 lib/compass/sass_extensions/functions/display.rb
compass-0.13.alpha.4 lib/compass/sass_extensions/functions/display.rb
compass-0.13.alpha.3 lib/compass/sass_extensions/functions/display.rb
compass-0.13.alpha.2 lib/compass/sass_extensions/functions/display.rb
compass-0.12.2 lib/compass/sass_extensions/functions/display.rb
compass-0.12.2.rc.1 lib/compass/sass_extensions/functions/display.rb
compass-0.12.2.rc.0 lib/compass/sass_extensions/functions/display.rb
compass-0.13.alpha.0 lib/compass/sass_extensions/functions/display.rb
compass-0.12.1 lib/compass/sass_extensions/functions/display.rb
compass-0.12.0 lib/compass/sass_extensions/functions/display.rb
compass-0.12.rc.1 lib/compass/sass_extensions/functions/display.rb
compass-0.12.rc.0 lib/compass/sass_extensions/functions/display.rb