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.9.0 lib/lucid_app/context.rb
isomorfeus-preact-10.8.2 lib/lucid_app/context.rb
isomorfeus-preact-10.8.1 lib/lucid_app/context.rb
isomorfeus-preact-10.8.0 lib/lucid_app/context.rb
isomorfeus-preact-10.7.3 lib/lucid_app/context.rb
isomorfeus-preact-10.7.2 lib/lucid_app/context.rb
isomorfeus-preact-10.7.1 lib/lucid_app/context.rb
isomorfeus-preact-10.7.0 lib/lucid_app/context.rb
isomorfeus-preact-10.6.62 lib/lucid_app/context.rb
isomorfeus-preact-10.6.61 lib/lucid_app/context.rb
isomorfeus-preact-10.6.60 lib/lucid_app/context.rb
isomorfeus-preact-10.6.59 lib/lucid_app/context.rb
isomorfeus-preact-10.6.58 lib/lucid_app/context.rb
isomorfeus-preact-10.6.57 lib/lucid_app/context.rb
isomorfeus-preact-10.6.56 lib/lucid_app/context.rb
isomorfeus-preact-10.6.55 lib/lucid_app/context.rb
isomorfeus-preact-10.6.54 lib/lucid_app/context.rb
isomorfeus-preact-10.6.53 lib/lucid_app/context.rb
isomorfeus-preact-10.6.52 lib/lucid_app/context.rb
isomorfeus-preact-10.6.51 lib/lucid_app/context.rb