Skip to content

Instantly share code, notes, and snippets.

@Odaeus
Last active June 14, 2016 14:04
Show Gist options
  • Save Odaeus/659e6f3505a368b08e40436e31661330 to your computer and use it in GitHub Desktop.
Save Odaeus/659e6f3505a368b08e40436e31661330 to your computer and use it in GitHub Desktop.
@import "globals";
custom-element {
--custom-var: $primaryColour;
}
Rails.application.config.assets.configure do |env|
# Add ".psm" extension to wrap a file in a Polymer style module
PsmWrapper = ->(input) {
<<~DOC
<dom-module id="#{input[:name]}">
<template>
<style>
#{input[:data]}
</style>
</template>
</dom-module>
DOC
}
env.register_engine ".psm", PsmWrapper, mime_type: "text/html"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment