Usual way to import background just for one type of nodes in Drupal is like following: body .node-type-foo.
But, recently, for some reason it did not work, and I just made one desperate move left and stick class to the body, like this: body.node-type-foo.
And, suddenly, everything started to work.
Can someone explain me this bizarre case? Bizarre for me, at least.
That presence or lack of a single space between the (body) element and the class selection symbol (.) causes two different selections to occur. No space means the style will apply to elements which are themselves marked with that class navbar.
A single space means the style will apply to elements within the element which themselves are marked with the class.
So, in your case, AS I UNDERSTAND IT
would apply to an element with a class of .node-type-foo if it was INSIDE the body which it isn’t because it’s the whole page.
will work because the class is being applied TO the body.