Autocomplete for Bootstrap 3 is missing some selectors like .table-striped

Hello,

I am trying to get phpstorm to recognize the .table-striped selector so that it appears in the list for auto complete and goto declaration.

I tried invalidating caches and restart and that did not work.

I found the selector in the bootstrap.css file, then did a find usages.  I have a attached an image.

What should I do to get PHPStorm to recognize it?



Attachment(s):
2015-10-06_15-38-53.Missing Selector.png
2015-10-06_15-38-04.Missing Selector.png
2015-10-06_15-37-25.Missing Selector.png
5 comments
Comment actions Permalink

Is bootstrap.css included in your .twig file using <link> tag?
Only selectors from those stylesheets that are stored locally in your  project and explicitly included in HTML (PHP, TWIG, etc.) via <link> tags are  available for completion. We have a feature request for adding intellisense for selectors that aren't explicitly linked - https://youtrack.jetbrains.com/issue/WEB-17009. Please follow it for updates

0
Comment actions Permalink

yes, there is a link tag in the head of base.html.twig

0
Comment actions Permalink

I was able to get .table-striped to work if I create an empty style definition in the css file.

Bootstrap.css only has .table-striped in 1 location like this:

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}


Autocomplete started working when I added this to the CSS file:

.table-striped {

}



Is this a bug or is there something that I have to do?

0
Comment actions Permalink

Not exactly. The Selector in that issue is conditional on other elements.  My problem is that the selector is not recognized because of a hierarchical issue.

0

Please sign in to leave a comment.