var html = @"<style>div { margin: 24px } #x div { margin: inherit }</style>"; var parser = new HtmlParser(new HtmlParserOptions(), BrowsingContext.New(Configuration.Default.WithCss(new CssParserOptions()))); var dom = parser.ParseDocument(html); var styleSheet = dom.StyleSheets[0] as ICssStyleSheet; var css = styleSheet.ToCss(); // -> "div { margin: 24px }\r\n#x div { }"
This seems to only occur if a shorthand is specified. If you specify margin-top: inherit
for example it works.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4