Sha256: bff193b54b5374deb729fa6bb31087e3d334db4c2084a45d4e6ee45926272c0d

Contents?: true

Size: 498 Bytes

Versions: 11

Compression:

Stored size: 498 Bytes

Contents

module BootstrapEmail
  module Converter
    class Spacing < Base
      def build
        each_node('*[class*=space-y-]') do |node|
          spacer = node['class'].scan(/space-y-((lg-)?\d+)/)[0][0]
          # get all direct children except the first
          node.xpath('./*[position() < last()] | ./tbody/tr/td/*[position() < last()]').each do |child|
            next if margin_bottom?(child)

            add_class(child, "mb-#{spacer}")
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bootstrap-email-1.1.4 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.1.3 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.1.2 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.1.1 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.1.0 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.0.2 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.0.1 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.0.0 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.0.0.alpha4 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.0.0.alpha3.1 lib/bootstrap-email/converters/spacing.rb
bootstrap-email-1.0.0.alpha3 lib/bootstrap-email/converters/spacing.rb