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

Showing selected inter-language links #13

Open
eigengrau opened this issue May 19, 2015 · 1 comment
Open

Showing selected inter-language links #13

eigengrau opened this issue May 19, 2015 · 1 comment

Comments

@eigengrau
Copy link

I wouldn’t propose to have this in the default stylesheet, but I thought I might ask you if you knew a less combersome way of achieving this; we might then add it to the GH Wiki for interested parties. The interlanguage links are rather important to me, not only to switch quickly, but also because I’m often unsure as to what the right lemma would be in the other language. But obviously I don’t want to see the complete language list.

I have no clue about CSS, but I came up with a very convoluted way of only showing selected languages. Maybe you have some idea on how this could be done better, to add it to the Wiki. The main problem seems to be that the display property can’t be overridden for children.

What I did was exclude #mw-navigation from hiding, and I added these:

#mw-navigation > :not(#mw-panel) {
  display: none;
}

#mw-panel > :not(#p-lang) {
    display: none;  
}

#p-lang {
    background-image: none !important;
}

#p-lang > :not(div) {
    display: none;  
}

#p-lang > div > :not(ul) {
    display: none;
}

#p-lang > div > ul > *  {
    display: none;
}

#p-lang > div > ul > .interwiki-en, 
#p-lang > div > ul > .interwiki-de  {
    display: block;
}
@simonnier
Copy link

@eigengrau Thank you so much for your solution. Extremely useful!

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

No branches or pull requests

2 participants