Closed Bug 1557699 Opened 5 years ago Closed 5 years ago

Improve specificity in CSS

Categories

(DevTools :: Application Panel, enhancement)

enhancement
Not set
normal

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: ogasidlo, Assigned: ogasidlo)

References

Details

(Whiteboard: foundation-work)

Attachments

(1 file)

Improve specificity in CSS by replacing tags as selectors with classes.

App.css

Let's keep in mind that some styles might make sense to have them global (for instance, colors for all links in the panel). This could also be a good bug to clean up some styling we were doing wrong. Some suggestions:

In App.css:

  • h1 this should have its own class selector
  • a it seems reasonable to provide global styles (i.e. not use a specific selector) for things like color, not underlining, etc.
  • Lets move the margin rule to the place that actually needs it (probably the WorkerListEmpty component).

All over CSS files:

  • This is a good opportunity to create a --base-unit: 4px var and use measurements in terms of multiples of this, like we did with remote debugging.
  • The same for font-sizes, colors, etc. Let's use css vars for it. Note that they might already exist in the common CSS files that are already being loaded for panels.
Assignee: nobody → ogasidlo
Status: NEW → ASSIGNED

Added variables in base.css, reduced specificity

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: