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

CRM-21195: Improving menu item icon markup #11054

Merged
merged 2 commits into from
Oct 31, 2017
Merged

CRM-21195: Improving menu item icon markup #11054

merged 2 commits into from
Oct 31, 2017

Conversation

omarabuhussein
Copy link
Member

@omarabuhussein omarabuhussein commented Oct 2, 2017

Before

Menu item icon was generated like this :

<span class="fa fa-search"></span>&nbsp; Search

but there should be a CSS class that identfiy the menu item icon so it easy to style menu item icons in CSS.

After

Current the generated makrup will look like this :

<span class="menu-item-icon fa fa-search"></span>Search

So basically menu-item-icon class is added to all menu item icons and the non breaking space   was removed and replace with right margin :

.menu-item-icon {
  margin-right: 5px;
}

@omarabuhussein
Copy link
Member Author

@colemanw can you take a look at this ^ ?

@colemanw
Copy link
Member

colemanw commented Oct 2, 2017

@omarabuhussein that markup was getting heavy. I've pushed to this PR a lighter-weight version that should work. Let me know what you think.

@omarabuhussein
Copy link
Member Author

to be honest my changes was based on a suggestion of my colleague @AkA84 since his idea was that there should be a class that identify the menu item icon which simplifies styling, but since I am not a Front-End savvy I cannot tell which one will be better on the long run so I will leave it for you and him to discuss this.

@AkA84
Copy link

AkA84 commented Oct 3, 2017

@omarabuhussein @colemanw it loses a bit the expressiveness, but as long as we are fine that if there is an <i> then it must be an icon, then it's fine for me as well

@colemanw colemanw merged commit 45ebc19 into civicrm:master Oct 31, 2017
@omarabuhussein omarabuhussein deleted the CRM-21195-improve-menu-item-icons-markup branch November 14, 2017 11:01
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
…e-menu-item-icons-markup

CRM-21195: Improving menu item icon markup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants