See: #2405553: Ensure code is inline with the current standards
Remaining tasks
Review the current CSS — What to look for when reviewing CSS
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #34 | 2408475-27-after-chrome-vertical.gif | 15.22 KB | idebr |
| #34 | 2408475-27-after-ff-vertical.gif | 10.27 KB | idebr |
| #34 | 2408475-27-after-ie-vertical.gif | 25.15 KB | idebr |
| #31 | 2408475-27-after-chrome.gif | 6.18 KB | idebr |
| #31 | 2408475-27-after-ff.gif | 4.5 KB | idebr |
Comments
Comment #1
lewisnymanUploaded the css file so it can reviewed with Dreditor
Comment #2
lewisnymanComment #3
joaogarin commentedOnly found this line break at the end of :
.skip-link.visually-hidden.focusable:hover,
.skip-link.visually-hidden.focusable:focus,
.skip-link.visually-hidden.focusable:active
Comment #4
joaogarin commentedComment #7
lewisnymanI think we might be able to remove these :link and :visited selectors, as .skip-link should be strong enough to override the 'a' selector. That means we can merge these two blocks together
We can remove these lines and just add the outline: 0 property to the .skip-link selector
Comment #8
joaogarin commentedThink it works like this?
skip-link rule might be a bit crowded but the file looks more clean.
Comment #9
joaogarin commentedComment #10
lewisnymanThanks for the work, unfortunately I found one or two issues, this is what the skip link looks like now:

It seems like we should move
text-decoration: noneunder askip-link:focusso it overrides it correctly. CSSlint is also saying that we should only remove outline on:focusselectors, although I'm not sure why. If we are having a :focus selector anyway I don't see the harm in moving it down.Does that make sense?
Comment #11
lewisnymanAlso:
1. The comment at the top of the file needs a @file tag, see: https://www.drupal.org/coding-standards/docs#file
2. It needs a blank line after the comment
Comment #12
joaogarin commentedHello,
Here is the patch. Maybe on the @file tag there should be a more intuitive explanation about what the skiplink is? Thanks for your patience;)
Comment #13
joaogarin commentedComment #14
lewisnymanYeah that sounds like a good idea :) Maybe something like: "Allows keyboard users to quickly skip to the main content of the page"
Comment #15
joaogarin commentedHello,
Here is a new patch with a better info on the @file tag.
Comment #16
joaogarin commentedAdded a missing full stop in the end of the comment.
Comment #17
idebr commented@joaoagarin Thanks for working on this! It's looking much cleaner already :)
The skip-link has no margin-top by default, so this attribute can be removed.
An element that has
position: absoluteis always treated asdisplay: block;, so this attribute can be removed.This padding looks identical on LTR and RTL, so the RTL styling and the /* LTR */ comment can be removed.
The
outline: 0;is already inherited bya:focus { outline: 0; }, so this can be removed as well.Comment #18
idebr commentedComment #19
joaogarin commentedHello,
Thanks for the info. I will provide another patch as soon as possible. Probably tonight or so!I haven't forgotten this;P
Comment #20
joaogarin commentedHello I am putting up a patch with these changes. I haven't yet tried the approach with CSS transform. I will try it out later in the night if I get some time on it.
Comment #21
joaogarin commentedJust providing a screenshot how it looks now.
Comment #22
idebr commented@joaogarin Thanks for working on this! I did a manual test and found a few more things that should be fixed before this can be committed:
A line in a comment should be no longer than 80 characters.
This attribute is inherited from
.visually-hidden, so it can be removed safely from this selector.Let's replace the negative margin with a
transform: translateX(-50%)like the similar issue in Bartik: #2409069: Clean up the "skip-link" component in Bartik. This approach has identical results on LTR and RTL, so all related RTL styling and comments can be removed as well.This is the default value for
width, so this attribute can be removed.The last
10pxis inferred, so this can be written as shorthand, eg.padding: 1px 10px 2px;This :focus state is the only applicable state, so the selectors for
:hoverand:activecan be removed.Comment #23
pjbaertI'll grab this
Comment #24
pjbaertI updated the lines @idebr mentioned
Comment #25
pjbaertDeleted one more reference to RTL
Comment #26
lewisnymanGreat thanks! I manually tested this and it looks good on LTR and RTL. One tiny nitpick:
I think the description belongs on a separate line to the title, see the Doxygen standards
Comment #27
pjbaertUpdated
The description is now on a different line.
Comment #28
lewisnymanNice one! Thanks.
Comment #29
idebr commented+1, thanks @pjbaert!
Comment #30
alexpottSomething is broken here - if I have toolbar enabled and I tab through the focusable elements on the page the skip link does not appear.
Comment #31
idebr commentedI'm unable to reproduce the issue reported by @alexpott:
Windows Google Chrome:
Windows Firefox:
Windows IE11:
Comment #32
pjbaert+1
I did have another look at it but I can't seem to reproduce the bug @alexpott suggests.
Comment #33
lewisnymanHow about with the toolbar menu set to vertical display?
Comment #34
idebr commentedSame thing:
Windows Google Chrome:
Windows Firefox:
Windows IE11:
Comment #35
lewisnymanhmm ok, in that case setting back to RTBC and maybe Alex can give us some more information.
Comment #36
alexpottFound out why! If you turn off javascript then the "skip to main content" does not appear in chrome (os x). Regardless of javascript being on I can not get it to appear in Firefox (os x). But this is due to:
see https://stackoverflow.com/questions/11704828/how-to-allow-keyboard-focus...
So I think we should get a follow up to fix the fact that with toolbar and no javascript the skip to main content tab is hidden.
CSS is not frozen in beta. Committed 5cd98c4 and pushed to 8.0.x. Thanks!
Comment #38
idebr commentedThanks @aloxpott! I had that option enabled for so long I had forgotten it existed at all.
I created a followup for the skip-link being invisible with the toolbar enabled but without javascript at #2449539: Skip link not visible without javascript