How can you tell PhpStorm that a DIV id is CSS and to look for that id in a css file?

This may not be possible I do not know.  I read or heard about something in one of the video's on the site or in a blog post or somewhere I gleamed this.   Something about the ability to tell PhpStorm the kind of schema or language certain code is and how it should be identified.    In the debugger / editor settings I had XML duplicate id marked and in my code I have DIV tags that have the same ID because they are CSS id's but the setting I had set flagged these as errors which for XML that would be correct, I turned that particular checkbox off and the error went away.

Is it possible to tell PhpStorm to treat these DIV ID's as CSS and to look for the designation within CSS rules somewhere in the project whether a  CSS file or inline code somewhere?   If it is possible, can someone instuct me on how to do that?

I am not sure if this is even possible but if what I heard/read about telling PhpStorm about language usage is close to correct, shouldn't this be possible?


Thanks.

3 comments
Comment actions Permalink

Just reread what I wrote above.  I am refering to the code discovery feature thing that goes out and finds all the variables and stuff in all the files in the project.  Probably sort of obvious that is what I was meaning but sometimes I am the only one that gets how obvious things are so I am mentioning it explicitly that is what I was meaning.. the code discovery thing, feature.

0
Comment actions Permalink

Never mind, I started a new div and did the ctrl+space and the listing of all classes auto showed up in the code hint/code completion list.   I wasn't sure at first if this was being populated from CSS file or already designated id's from the same file so I opened up the css file added a new class then closed the css file.  Went back to the file I was editing and did the ctrl+space and the new class I just created showed up in the list.  I changed the class designation to id and the drop down changed to only show those available tags.

This is really an amazing software.

0
Comment actions Permalink

Glad that you sorted it out :)

0

Please sign in to leave a comment.