Pregunta

I am new to WebStorm 8. In my current project, everything is working fine except this :

<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"/>

WebStorm show errors with it. When I inspect the code, it says :

Selector matches unknown element bower_components

Nevertheless, this code works. What's wrong with this tag for WebStorm ?

Update : to Iena

Here is a simple example where WebStorm 8.0.2 shows errors :

Selector matches unknown element http (at line 4)

The code :

<!doctype html>
<html>
<head>
  <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
</head>
<body>
<button class="btn btn-primary">Works fine</button>
</body>
¿Fue útil?

Solución 2

As per your latest screenshot -- for some reason you have SASS language injected into href attribute of the link tag. Possibly (quite likely) it was done accidentally when typing a lot and not paying enough attention (e.g. not looking at the screen at that particular moment).

Either use Un-inject Language/Reference from that popup menu .. or (which is better) delete that unwanted rule completely from Settings | Language Injections -- 4th one from the top, the one that has "global" in "Type" column.

Otros consejos

Place your caret on that unknown element and Press Alt+Enter then choose Un-inject Language.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top