We currently have 2 versions in our CSS: — body:not(.el-capitan) for OS X <10.11 — body.el-capitan for OS X 10.11 There is a problem that 10.12, or anything >10.11 for that matter, currently gets "unknown-mac" class and falls into body:not(.el-capitan) selector. We don't want that; we want 10.12 to have El Capitan styles until we introduce a new version. WebInspector.Platform.version.name is currently used to add a corresponding class name to <body>. We should do this instead: if (WebInspector.Platform.version.release <= 10) document.body.classList.add("legacy-mac"); else if (WebInspector.Platform.version.release >= 11) document.body.classList.add("latest-mac"); CSS selectors: — body.legacy-mac — body.latest-mac It will eliminate the need for :not() selector. Later, when we need to have a new (third) UI version, we will: — Keep .legacy-mac CSS rules unchanged — Rename all .latest-mac to .el-capipan — Write all new rules under .latest-mac prefix via https://bugs.webkit.org/show_bug.cgi?id=147524#c8
Created attachment 258531 [details] Patch
Comment on attachment 258531 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258531&action=review > Source/WebInspectorUI/ChangeLog:28 > + We currently have 2 versions in our CSS: > + - body:not(.el-capitan) for OS X <10.11 > + - body.el-capitan for OS X 10.11 > + > + There is a problem that 10.12 (or >10.11, to be exact) currently gets > + "unknown-mac" class and falls into body:not(.el-capitan) selector. We don't want > + that; we want 10.12 to have El Capitan styles until we introduce a new version. > + > + WebInspector.Platform.version.name is currently used to add a corresponding class > + name to <body>. Instead we should use: > + > + - .legacy-mac for OS X <10.11 > + - .latest-mac for OS X >=10.11 > + > + It will eliminate the need for :not() selector. > + > + Later, when we need to have a new (third) UI version, we will: > + - Keep .legacy-mac CSS rules unchanged > + - Rename all .latest-mac to .el-capitan > + - Write all new rules under .latest-mac prefix Lets drop this.
Created attachment 258535 [details] Patch
Created attachment 258536 [details] Patch
Comment on attachment 258536 [details] Patch Clearing flags on attachment: 258536 Committed r188173: <http://trac.webkit.org/changeset/188173>
All reviewed patches have been landed. Closing bug.