phoenix_slime icon indicating copy to clipboard operation
phoenix_slime copied to clipboard

Support Embedded Engines with HTML Tags

Open johns10 opened this issue 4 years ago • 3 comments
trafficstars

I attempted to create a scoped style tag using the css: prefix. Based on what I've read about slim, it should support css class="myClass", but when I attempt to use it like this:

css class="test":
    p { background-color: blue; }

it renders like this:

 <css class="test">:
p { background-color: blue; }
</css>

johns10 avatar Apr 20 '21 00:04 johns10

Hello @johns10! Attributes on css: is not supported right now.

You can do it with inline html like this:

<style class="test" type="text/css">
  p { background-color: blue; }
</style>

Rakoth avatar Apr 20 '21 05:04 Rakoth

I thought I tried this, but I'll give it another go.

johns10 avatar Apr 24 '21 23:04 johns10

When I use this method, I get:

** (Slime.TemplateSyntaxError) Unexpected indent
INPUT, Line 2, Column 0
  p { background-color: blue; }

I tried it like this:

<style class="test" type="text/css">
  p { background-color: blue; }
</style>

And like this:

style class="test" type="text/css"
  p { background-color: blue; }

I get the same error either way.

johns10 avatar May 16 '21 01:05 johns10