Sha256: 9f0a2cf3105b9beec724dedea1367c8ce788f9d31ab41f59fa47e44752ec1135
Contents?: true
Size: 582 Bytes
Versions: 2
Compression:
Stored size: 582 Bytes
Contents
# frozen_string_literal: true require 'sass/css' module KepplerFrontend module LiveEditor module Css # CssHandler class Convert def initialize(input) @input = input end def to_scss scss = Sass::CSS.new(@input).render(:scss) scss = scss.split("\n").select do |line| line unless line.include?('initial') || line.include?('undefined') end scss.join("\n") end def to_css Sass::Engine.for_file(@input, {}).render end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems