Skip to content

Loading…

Issues with _links.scss #93

Closed
andykirk opened this Issue · 2 comments

2 participants

@andykirk

Hi Harry

Just found a couple of issues with _links.scss, specifically .current a:

1. Just come across a situation where I need to nest <ul>'s for sub-menus:

<ul class=nav>
...
<li class=current><a href=#>Somewhere</a>
<ul class=subnav>
<li><a href=#>Sub 1</a>
...
</ul>
</li>
</ul>

.current a affects the sub-menu links too, so IMO the selector should be .current > a

2. I question whether this is the right way to do things in any case. A link to the same page you're currently on is still a link, and whilst it should probably appear different, making it appear NOT like a link I think is confusing.
It's perfectly valid to simply not have an href attribute on an <a> to mark a menu item as current (see spec).
From my quick tests, leaving off the href makes an <a> behave just like a generic span, and no hover or focus styles etc. apply at all anyway. This means it could just be left up to the designer to apply any appropriate styles and so .currrent. and could maybe be left out altogether? Or perhaps at least qualified with .current >a[href], or something?

Just a few thoughts.
What do you think?

Cheers,
Andy

Oh - and Happy Christmas :-)

@silvenon silvenon referenced this issue
Closed

Remove/fix some design choices #94

3 of 6 tasks complete
@csswizardry
Owner

I’ve currently scoped this to children only, I’ll ponder the rest :)

As for hrefless as not having :hover states etc, this is what happens http://jsfiddle.net/X9dXT/ and http://jsfiddle.net/X9dXT/1/

I initially had the a styles scoped to :link but took them out after someone’s request: c591f30

It’s also worth noting that if you want to handle current states differently then it might be worth just not using the .current that inuit.css provides :)

@andykirk

Hi, thanks for the consideration and the update.

Not using .current isn't really an option as I'm styling html generated by a cms which uses that class name. Well, I could change all the templates but .current is such an obvious name to use. :-)

For now I'll override it or just leave out _links altogether, so no worries.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.