jargon

Frontend & browser·Layout, CSS and the cascade

you moved the import to the bottom of the file and the styles started applying.

Source order

Also calledlast one wins, declaration order

The final tie-break in the cascade: with equal importance, layer and specificity, the declaration that appears later wins. It is the reason bundler import order and the position of a component's stylesheet in the output are load-bearing, and the reason the same code can behave differently in dev and in a production build. Relying on it deliberately is fine and cheap; relying on it accidentally is a class of bug that only appears after a build change.

Commonly confused with