Sha256: cc6b05aa135a16ca0f7b4b41e15004d7d9dfceb0a1c43204b43859ae57b90de4

Contents?: true

Size: 782 Bytes

Versions: 36

Compression:

Stored size: 782 Bytes

Contents

module LucidApp
  module Context
    def self.create_application_context
      nano_css = `null`
      css_server = `null`
      css_server = `document.getElementById('css-server-side')` unless on_ssr?
      %x{
        let n = Opal.NanoCSS;
        nano_css = (css_server) ? n.create({ sh: css_server }) : n.create();
        n.rule(nano_css);
        n.sheet(nano_css);
        n.nesting(nano_css);
        n.hydrate(nano_css);
        n.unitless(nano_css);
        n.global(nano_css);
        n.keyframes(nano_css);
        n.fadeIn(nano_css);
        n.fadeOut(nano_css);
        Opal.global.NanoCSSInstance = nano_css;
      }
      Preact.create_context('LucidApplicationContext', { iso_store: Isomorfeus.store, nano_css: nano_css })
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
isomorfeus-preact-10.6.50 lib/lucid_app/context.rb
isomorfeus-preact-10.6.49 lib/lucid_app/context.rb
isomorfeus-preact-10.6.48 lib/lucid_app/context.rb
isomorfeus-preact-10.6.47 lib/lucid_app/context.rb
isomorfeus-preact-10.6.46 lib/lucid_app/context.rb
isomorfeus-preact-10.6.45 lib/lucid_app/context.rb
isomorfeus-preact-10.6.44 lib/lucid_app/context.rb
isomorfeus-preact-10.6.43 lib/lucid_app/context.rb
isomorfeus-preact-10.6.42 lib/lucid_app/context.rb
isomorfeus-preact-10.6.41 lib/lucid_app/context.rb
isomorfeus-preact-10.6.40 lib/lucid_app/context.rb
isomorfeus-preact-10.6.39 lib/lucid_app/context.rb
isomorfeus-preact-10.6.38 lib/lucid_app/context.rb
isomorfeus-preact-10.6.37 lib/lucid_app/context.rb
isomorfeus-preact-10.6.36 lib/lucid_app/context.rb
isomorfeus-preact-10.6.35 lib/lucid_app/context.rb