concept
Style resolution — CSS reference
Style resolution determines property values using matching declarations, cascade, inheritance and value computation. A class selector wins over a type selector when other cascade priorities tie. getComputedStyle exposes resolved values, which sometimes reflect used rather than strictly computed values.
Formal Syntax & Structure
css syntaxcss
p { color: red; } .notice { color: blue; }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>style-resolution</title><style>body{margin:8px;font:16px/24px sans-serif;color:black;background:white}#a{box-sizing:border-box}p{color:red}.notice{color:blue}</style><body><p id="a" class="notice">Notice <span id="b">child</span></p></body></html>