Sha256: 898397bef37609f9d9bf428a752466f3769c21983fbadfbc11c95046f9d21e3d

Contents?: true

Size: 797 Bytes

Versions: 15

Compression:

Stored size: 797 Bytes

Contents

# A list of styles defined by a manifest group or a "style" asset folder.
# Usually part of a mod_style_assets card
include_set Abstract::AssetGroup

def asset_input_content
  format(:scss).render_core
end

format :scss do
  view :core do
    card.item_cards.compact.map do |mcard|
      mcard.format(:scss)._render_core
    end.join "\n"
  end
end

def valid_file_extensions
  %w[css scss]
end

def new_asset_constants path
  if path.ends_with? ".scss"
    scss_constants
  elsif path.ends_with? ".css"
    css_constants
  end
end

def scss_constants
  { type_id: ScssID, set_module: Abstract::AssetScss }
end

def css_constants
  { type_id: CssID, set_module: Abstract::AssetCss }
end

format :html do
  view :stylesheet_include_tag do
    stylesheet_include_tag card.asset_output_url
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
card-mod-style-0.18.1 set/abstract/style_group.rb
card-mod-style-0.18.0 set/abstract/style_group.rb
card-mod-style-0.17.0 set/abstract/style_group.rb
card-mod-style-0.16.0 set/abstract/style_group.rb
card-mod-style-0.15.6 set/abstract/style_group.rb
card-mod-style-0.15.5 set/abstract/style_group.rb
card-mod-style-0.15.4 set/abstract/style_group.rb
card-mod-style-0.15.3 set/abstract/style_group.rb
card-mod-style-0.15.2.pre1 set/abstract/style_group.rb
card-mod-style-0.15.1.1 set/abstract/style_group.rb
card-mod-style-0.15.1 set/abstract/style_group.rb
card-mod-style-0.15.0 set/abstract/style_group.rb
card-mod-style-0.14.2 set/abstract/style_group.rb
card-mod-style-0.14.1 set/abstract/style_group.rb
card-mod-style-0.14.0 set/abstract/style_group.rb