May I know how to build a CSS style parser/evaluator in JavaScript for below:
.book { width: calc(200px + 400px); }
.book h1 { font-size: 10em; }
div.book { color: blue; }
.book.green { background: green; }
.book[name="hello"] { color: pink; }
.book[data-name="hi"], .other-book { color: red; }
.book > a { text-decoration: none; }
.book a:nth-child(2) { color: purple; }