New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use separate highlight styles for different platforms #78

Closed
6a68 opened this Issue Mar 10, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@6a68
Copy link
Member

6a68 commented Mar 10, 2016

_This might be a little too ambitious for a good first bug, so if you are a new contributor and are interested in taking this on, please ping me to get guidance before you start. IRC is best (my nick is 6a68), or leave a comment in this bug.

Right now, we style the recommendation the same way for all platforms. In general, this is fine, but it would be nice to have platform-specific highlight behavior when the recommendation row is selected.

Here's a sketch of the tasks required:

  • Create individual files in the chrome/skin/ directory for mac, windows, and linux.
  • In each file, copy over the highlight style for each platform (see this comment for links to files). You want to take the .autocomplete-richlistitem[selected=true] rules, but apply them to the #universal-search-recommendation selector.
  • Modify the stylesheet loading code to add a check for the platform type, then load a second, platform-specific highlight stylesheet.
  • You can get the platform type by checking the value of Services.appinfo.OS. The possible values of interest are 'Darwin', 'Linux', and 'WINNT'. (It takes about 4 hops in MDN to track this info down, directly inserting the answer here to keep the bug manageable overall.)
  • Once the changes are made, restart Firefox and see if the recommendation highlight matches the highlight of the other rows in the autocomplete dropdown. If it looks good, open a pull request. Don't worry about checking all three platforms; I can check that.
@kaganjd

This comment has been minimized.

Copy link
Collaborator

kaganjd commented Mar 17, 2016

starting to dig into this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment