Closed Bug 1754547 Opened 2 years ago Closed 2 years ago

Provide a @media query to target major platform/toolkits

Categories

(Toolkit :: Themes, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: sfoster, Assigned: emilio)

References

Details

Attachments

(1 file, 1 obsolete file)

We currently use CONFIG["MOZ_WIDGET_TOOLKIT"] to determine which of the windows/osx/linux theme directory branches to package. We don't have a good way to make a similar distinction from the stylesheet itself however.

I'd like to be able to provide a media query and set of rules for each of the major platforms/toolkits we support, e.g.

@media (-moz-platform: windows) {
  /* some rules targeting windows OS  */
}
@media (-moz-platform: osx) {
  /* some rules targeting mac OS  */
}
@media (-moz-platform: linux {
  /* some rules targeting linux (by which I think we normally mean gtk in practice?  */
}

I'm not sure what the naming or query structure should be. We support @media (-moz-mac-rtl for example, but also @media (-moz-os-version: windows-win10).

Not sure if this is in the right bug component, but there's that bug :emilio. Let me know if I can answer any more questions about the requirement.

Blocks: 1659584
Flags: needinfo?(emilio)
Assignee: nobody → emilio
Flags: needinfo?(emilio)

Allow differentiating non-windows platforms on it.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b9a5979a66e
Generalize moz-os-version into moz-platform. r=dao,preferences-reviewers,Gijs
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch

find . -type f -not -path ".hg/" -not -path "suite/" -regex "..css$" -exec sed -i -E 's/-moz-os-version/-moz-platform/g' {} ;

Attachment #9263433 - Attachment is obsolete: true
Blocks: 1883513
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: