Changes for all the late feedback of pull request 8720.

Including fixes for #8850, #8851 and #8852 as they are closely related to the changes in this pull request. 

Also fix #8865 and #8870 for variable interpolation in LESS.
```
.content {
	.sidebar {
		background: #999;
		color: white;
		padding: 5px;
		float: left;
		width: 100px;
		a, p  {
			display: block;
			color: white;
		}
		@media (max-width: 480px) {
			width: 95%;
			a {
				display: inline;
			}
		}
	}
}
```
The above example shows that `a, p` outside of @media block is the sibling of the `a` block inside the @media block.