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

nav links inconsistencies #18630

Closed
bassjobsen opened this issue Dec 22, 2015 · 2 comments
Closed

nav links inconsistencies #18630

bassjobsen opened this issue Dec 22, 2015 · 2 comments
Labels

Comments

@bassjobsen
Copy link
Contributor

#18623 tells me that $nav-link-hover-bg is an unused variable. When looking to the nav links (in scss/_nav.scss) i found that:

  1. i can not style the link's color and :hover color using variables
  2. but i can style the disabled state color by $nav-disabled-link-color and $nav-disabled-link-hover-color

The nav links (.nav-link) inherit their color and :hover color from the a selector set in scss/reboot.scss.

Some suggestions to solve these inconsistencies

  1. set the disabled state for the a selectors in scss/reboot.scss and remove it from the nav code

  2. create (and) use variables for all (normal, hover, active and disabled states), like:
    $nav-link-color: $link-color !default;
    $nav-link-bg: transparent !default;

    $nav-link-hover-color: $link-hover-color !default;
    $nav-link-hover-decoration: $link-hover-decoration;
    $nav-link-hover-bg: transparent !default;

    $nav-active-link-color: $component-active-color !default;
    $nav-active-link-hover-color: $component-active-color !default;
    $nav-active-link-hover-bg: transparent !default;

    $nav-disabled-link-color: $gray-light !default;
    $nav-disabled-link-hover-color: $gray-light !default;
    $nav-disabled-link-hover-bg: transparent !default;

  3. do both 1. and 2.

I'm not sure why for instance $nav-link-color does not exists yet. Personally i think we should implement 3. because of it does not change anything for the default, but enables you to configure the nav (and other components) by setting some variables.

@mdo
Copy link
Member

mdo commented Jan 6, 2016

The nav links, by default, inherit the global link color. Setting it to a new variable here doesn't make much sense to me and just adds new, unnecessary CSS. I understand the problem here, but I don't think either solution presented here is better than what we have today.

Looking at the navs Sass file though, there is some easy cleanup I can get in there. PR forthcoming!

@mdo mdo mentioned this issue Jan 6, 2016
@mdo
Copy link
Member

mdo commented Jan 6, 2016

PR: #18783.

@mdo mdo closed this as completed Jan 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants