WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147794
Web Inspector: Simplify OS-specific CSS class names
https://bugs.webkit.org/show_bug.cgi?id=147794
Summary
Web Inspector: Simplify OS-specific CSS class names
Nikita Vasilyev
Reported
2015-08-07 14:20:45 PDT
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
Attachments
Patch
(9.07 KB, patch)
2015-08-07 14:50 PDT
,
Nikita Vasilyev
timothy
: review+
Details
Formatted Diff
Diff
Patch
(8.18 KB, patch)
2015-08-07 15:29 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Patch
(8.18 KB, patch)
2015-08-07 15:30 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Nikita Vasilyev
Comment 1
2015-08-07 14:50:25 PDT
Created
attachment 258531
[details]
Patch
Timothy Hatcher
Comment 2
2015-08-07 15:01:57 PDT
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.
Nikita Vasilyev
Comment 3
2015-08-07 15:29:34 PDT
Created
attachment 258535
[details]
Patch
Nikita Vasilyev
Comment 4
2015-08-07 15:30:24 PDT
Created
attachment 258536
[details]
Patch
WebKit Commit Bot
Comment 5
2015-08-07 16:25:54 PDT
Comment on
attachment 258536
[details]
Patch Clearing flags on attachment: 258536 Committed
r188173
: <
http://trac.webkit.org/changeset/188173
>
WebKit Commit Bot
Comment 6
2015-08-07 16:25:59 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug