Skip to content
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

Hightlighting the down-arrow next to user name on hover #4441

Merged
merged 1 commit into from
Aug 27, 2013

Conversation

ssrihari
Copy link
Contributor

  • the right-arrow wasn't highlighted on hover, which was
    inconsistent with the other header items
  • changed the user-menu items highlight color from #fff to #fafafa, which is
    consistent across the header
  • refactored the css to reduce specificity
  • refactored css to use nesting in class names instead of nesting in
    scss (as advocated by http://smacss.com) to reduce specificity and
    to enhance readability

@jhass
Copy link
Member

jhass commented Aug 26, 2013

Hm, so reduced specificity at the CSS level comes at the cost of increased redundancy at the HTML level.

@ssrihari
Copy link
Contributor Author

Yes, there is some redundancy in the class names. However, I do see some value in it here. For instance, user-menu-trigger isn't a user-menu-item even though they are both sibling <li>s. And if I had to add another <li> in the same <ul> which isn't a user-menu-item, I can differentiate it in the class. This way, the redundant class makes the html more semantic.

@ssrihari
Copy link
Contributor Author

Before:
[No highlight on hover of <li>]
image

[Highlight only name on hover of name] [Also, uses #fff as highlight color]
image

After:
[Highlight both][Uses #fafafa as highlight color, which is used across the header]
image

@jhass
Copy link
Member

jhass commented Aug 27, 2013

Can you please rebase against the latest develop branch?

git remote add upstream git://github.com/diaspora/diaspora.git
git checkout develop
git pull upstream develop
git checkout user-menu-highlight
git rebase develop
# You now got a merge conflict, git status will tell on which files. Either run git mergetool or manually open the files, resolve the conflict and run git add on them. Finally run git rebase --continue
git push -f origin user-menu-highlight

- the right-arrow wasn't highlighted on hover, which was
  inconsistent with the other header items

- changed the user-menu items highlight color from #fff to #fafafa, which is
  consistent across the header

- refactored the css to reduce specificity

- refactored css to use nesting in class names instead of nesting in
  scss (as advocated by http://smacss.com) to reduce specificity and
  to enhance readability
jhass added a commit that referenced this pull request Aug 27, 2013
Hightlighting the down-arrow next to user name on hover
@jhass
Copy link
Member

jhass commented Aug 27, 2013

Thank you!

@jhass jhass merged commit 623d517 into diaspora:develop Aug 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants