Closed Bug 1358956 Opened 8 years ago Closed 8 years ago

Remove the first separator from the status bar

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: vkatsikaros, Assigned: vkatsikaros)

Details

Attachments

(2 files, 1 obsolete file)

From https://bugzilla.mozilla.org/show_bug.cgi?id=1353057#c41 The new status bar shows a separator in the beginning which could be removed.
Attached image status_bar.png (obsolete) —
No separator in the 1st label of the status bar
Comment on attachment 8863231 [details] Bug 1358956 - Remove the first separator from the status bar. https://reviewboard.mozilla.org/r/135024/#review137946 ::: devtools/client/netmonitor/src/assets/styles/netmonitor.css:122 (Diff revision 1) > margin-inline-end: 10px; > /* Status bar has just one line so, don't wrap labels */ > white-space: nowrap; > } > > +.status-bar-label-first::before { I apologize in advance if this CSS-based fix is clumsy, but CSS isn't my strong point :/
Comment on attachment 8863231 [details] Bug 1358956 - Remove the first separator from the status bar. https://reviewboard.mozilla.org/r/135024/#review138014 Thanks for the patch, I think it's ok. R+ but please resolve my inline comment Thanks! Honza ::: devtools/client/netmonitor/src/assets/styles/netmonitor.css:125 (Diff revision 1) > } > > +.status-bar-label-first::before { > + content: ""; > + display: inline-block; > + margin-inline-end: 10px; Please remove the `margin-inline-end`
Attachment #8863231 - Flags: review?(odvarko) → review+
Comment on attachment 8863231 [details] Bug 1358956 - Remove the first separator from the status bar. https://reviewboard.mozilla.org/r/135024/#review138038 ::: devtools/client/netmonitor/src/assets/styles/netmonitor.css:122 (Diff revision 1) > +.status-bar-label-first::before { > + content: ""; > + display: inline-block; > + margin-inline-end: 10px; > + margin-top: 4px; > + margin-bottom: 4px; > + background: var(--theme-splitter-color); > +} You can remove this whole block altogether. ::: devtools/client/netmonitor/src/assets/styles/netmonitor.css:131 (Diff revision 1) > + margin-top: 4px; > + margin-bottom: 4px; > + background: var(--theme-splitter-color); > +} > + > .status-bar-label::before { Rather than introducing a new status-bar-label-first class, it seems like we can simply do: .status-bar-label:not(:first-of-type)::before { }
Attached image status_bar.png
Attachment #8863230 - Attachment is obsolete: true
Sorry I wasn't clear. The fix is as simple as: diff --git a/devtools/client/netmonitor/src/assets/styles/netmonitor.css b/devto --- a/devtools/client/netmonitor/src/assets/styles/netmonitor.css +++ b/devtools/client/netmonitor/src/assets/styles/netmonitor.css @@ -114,17 +114,17 @@ body, .status-bar-label { display: inline-flex; margin-inline-end: 10px; /* Status bar has just one line so, don't wrap labels */ white-space: nowrap; } -.status-bar-label::before { +.status-bar-label:not(:first-of-type)::before { content: ""; display: inline-block; margin-inline-end: 10px; margin-top: 4px; margin-bottom: 4px; width: 1px; background: var(--theme-splitter-color); }
Ok, I thought that the rest of the before was needed and only the separator (ie the 1px line) should be removed. Much simpler.
.status-bar-label-first isn't needed, also it's :not(:first-of-type) not :not(first)
Lessons learned, I refreshed my memory on CSS pseudo-classes and learned there is a handy one called ":first-of-type". Sorry for the necessary back and forth.
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b2d782465e6c Remove the first separator from the status bar. r=Honza
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: