Sha256: 4303fbd8fbeac3cce6f2e42cf3578ac41fe2b6d30e25688eed7d52fd71a897b8

Contents?: true

Size: 925 Bytes

Versions: 52

Compression:

Stored size: 925 Bytes

Contents

module Compass::SassExtensions::Functions::Display
  DEFAULT_DISPLAY = {
    :block => %w{address blockquote center dir div dd dl dt fieldset form
                 frameset h1 h2 h3 h4 h5 h6 hr isindex menu noframes
                 noscript ol p pre ul},
    :inline => %w{a abbr acronym b basefont bdo big br cite code dfn em
                  font i img input kbd label q s samp select small span
                  strike strong sub sup textarea tt u var},
    :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}
  }

  # 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

52 entries across 51 versions & 5 rubygems

Version Path
alphasights-compass-0.8.12 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.7.0 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.0 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.1 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.10 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.11 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.12 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.13 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.14 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.15 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.16 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.17 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.2 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.3 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.4 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.5 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.6 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.7 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.8 lib/compass/sass_extensions/functions/display.rb
chriseppstein-compass-0.8.9 lib/compass/sass_extensions/functions/display.rb