Sha256: ba46b7db660f6194d5e5cca63bdeb0bbc8074d91e20caa84969ccfbbaff9fe92

Contents?: true

Size: 550 Bytes

Versions: 12

Compression:

Stored size: 550 Bytes

Contents

include_set Abstract::Css
include_set Abstract::AssetInputter, input_format: :css, input_view: :compressed

# require 'w3c_validators'
require "sass"

event :validate_css, :validate, on: :save, changed: %i[type_id content] do
  # validator = W3CValidators::CSSValidator.new
  # results = validator.validate_text(content)
  # results.errors.each do |error|
  #  errors.add :content, "#{error.message} (line #{error.line})"
  # en
  ::Sass::SCSS::Parser.new(content, nil, nil).parse
rescue ::Sass::SyntaxError => e
  errors.add :content, e.message
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-mod-style-0.18.1 set/type/css.rb
card-mod-style-0.18.0 set/type/css.rb
card-mod-style-0.17.0 set/type/css.rb
card-mod-style-0.16.0 set/type/css.rb
card-mod-style-0.15.6 set/type/css.rb
card-mod-style-0.15.5 set/type/css.rb
card-mod-style-0.15.4 set/type/css.rb
card-mod-style-0.15.3 set/type/css.rb
card-mod-style-0.15.2.pre1 set/type/css.rb
card-mod-style-0.15.1.1 set/type/css.rb
card-mod-style-0.15.1 set/type/css.rb
card-mod-style-0.15.0 set/type/css.rb