I recently encountered some inherited CSS code within a complex project, and as a newcomer to this realm, I discovered the following:
.treeview li.submenu{ //details }
The code had li.submenu
tightly connected with no white space in between.
Upon attempting to correct this by separating them into .treeview li .submenu
, the HTML did not render as intended. Could it be attributed to conflicting code or might adding the whitespace have actually resulted in valid CSS?
My understanding is that, based on the example above, the leftmost item represents the parent while subsequent ones denote children nested within.
Thus, my query remains: Is it appropriate to concatenate using the period (.) in this syntax? If so, what purpose does it serve? Any personal investigation has yielded inconclusive results.