Sublime Forum

CSS Snippet is not Triggering

#1

Can you please let me know the fix?

<snippet>
    <content><![CDATA[
background: url('../img/${1:text-bg2.png}') no-repeat;
background-clip: text;
color: transparent;$2
]]></content>
    <tabTrigger>text-background</tabTrigger>
    <description>Text Background - CSS</description>
    <scope>source.css</scope>
</snippet>
0 Likes

#2

disable the Emmet plugin

1 Like

#3

But I need emmet. Is there no way to get CSS snippets working when emmet is active?

0 Likes

#4

As I recall Emmet unilaterally steals the Tab key so that it can use it’s own expansion shortcuts. As such if you want to be able to use that key for anything else you probably need to either rebind all of the core functionality assigned to that key to something else or configure Emmet to use a different key instead (if that’s even possible).

However I say this as someone that doesn’t use that package at all (the only time I ever see it mentioned it when someone is unhappy that it’s breaking things for them) so I don’t know if perhaps you could configure Emmet to be less aggressive or not.

1 Like

#5
2 Likes

#6

I have no idea my friend but still nothing is triggering in my ST3 even after restarting. Can you please check my codes?

Emmet Settings

Code for CSS Snippet

0 Likes