'Is it possible to set up auto-import in WebStorm without double dots?

I want in auto-import something like modules/Component/components/MyComponent instead of ../MyComponent.

Is it possible to do in WebStorm?



Solution 1:[1]

As it stands this:

background: linear-gradient(var(--menu-link-active-color) 0 100%) left / 0 repeat;

does nothing.

That is because the 3 parameters (actually, it's no-repeat in the codepen but that makes not difference to this linear-gradient) after the background-image (the linear-gradient) are:

position - left - self explanatory and actually corresponding to the default of 0

after the / is size and it's 0 i.e. the element has no size

repeat (or no-repeat)

Now, why bother you ask?

Well, the reason is because of the hover. When the user hovers the size is changed (using a CSS calculation) so that color (shown as an image by the linear gradient) expands all the way across the associated word.

Notice also that the color itself is given by a CSS variable, and that can change for each word or the state.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 A Haworth