CSS `composes: ...` suggestions and auto-complete Follow
IntelliJ understands the `composes` syntax:
composes: flex-centered from "../../../../../styles/layout.css";
In the above snippet IntelliJ does a good job understanding the syntax, both the `flex-centered` and the file path can be cmd-clicked to go to source. Additionally, once the full `from` path is there, the `flex-centered` can be suggested and auto-completed.
However when writing this line there are no suggested auto-completions (until the full path is manually typed in), which as in the example above it's quite cumbersome to write out the entire file path by hand. It would be great if one or both of these could work:
1. Type `composes: fle`... and get a suggestion of all composable classes name in scope ("fle" matches "flex-centered" from layout.css), and the entire rest of the line including the "from" path can be auto-completed.
2. Type `composes: x from "layou"`... and get a suggestion to all CSS files in scope ("layou" matches "layout.css") and auto-complete the entire path when selected.
Are either of these things possible?
Please sign in to leave a comment.
1. please feel free to file a request for this feature to youtrack, https://youtrack.jetbrains.com/issues/WEB
2. hit Ctrl+Space twice within quotes to get a list of all project files with names matching specified substring; full path will be completed when choosing a file from the list
Re: 2. That's great, I had no idea you could do that! (What is that feature called?) However it seems broken in my environment for some reason. When I select a completion (by pressing Enter) it doesn't get entered into the text, I just get "":
Any idea what's going on there?
Try entering the closing quote before completing the path
That works! I had tried that but must have done something off. This pretty much changes my life, thanks. :)