Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Nested CSS Classes – Child class to override parent class? Reply To: Nested CSS Classes – Child class to override parent class?

#250215
derjan
Participant

Hi,

using color: inherit on the <p> should do the trick.

.dark { color: #000; }
.light { color: #aaa; }

.dark p,
.light p {
  color: inherit;
}