"skin" vs. "content" stylesheets after Complete Theme removal (Fx57+)
MattN at mozilla.com
Thu Mar 16 23:48:58 UTC 2017
As many of you know, we use both content
and skin <https://developer.mozilla.org/en-US/docs/Chrome_Registration#skin>
stylesheets in the Firefox front-end and there are some guidelines
<https://wiki.mozilla.org/Firefox/CSS_Tips#Content_or_Theme_CSS> for how to
separate CSS properties between the two. I believe the primary reason for
the separation is so complete themes (which only replace our "skin"
stylesheets) don't have to re-implement our functional styles, only
Once we remove complete themes in 57
I think this should change since the primary factor for the separation will
be gone. I think the reasons are obvious (e.g. duplication of selectors
between files, confusing for new contributors, etc.) so I won't go into
those now. I think there are two high-level paths forward:
A) Consolidate all styles in one package (I think it would be "content" but
see discussion below¹)
** We can still use a preprocessor in CSS or in jar manifests to vary
B) Change the distinction to "content" for OS-agnostic styles and "skin"
** Essentially all "shared" skin styles can move to "content" which
simplifies things somewhat since we move from three locations for
stylesheets to two.
Note that I'm not suggesting we have to do this migration all at once or
right away but I'm trying to figure out the ideal situation and we can
figure out a migration strategy later. I'm starting this discussion a bit
early because we're already working on features and new stylesheets that
don't plan to ship until 56/57 so it's good to keep in mind the direction
¹ The "content" package is chrome-privileged whereas the "skin" package
isn't (even though they both use chrome URIs). The chrome privileges are
sometimes necessary with our style to avoid cross-origin issues related to
SVG and possibly other examples I don't know off-hand. Is there any
practical security benefit to using "skin" for everything (if possible)?
What do others think about changing/removing the "skin" vs. "content"
I personally think (B) is simplest to transition to while still providing a
clear separation for OS-specific styles so I lean towards it but if we can
come up with a good convention for handling OS-specific styles with option
(A) then that's also fine with me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the firefox-dev