-
Notifications
You must be signed in to change notification settings - Fork 19
Explore style tabs #95
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
base: master
Are you sure you want to change the base?
Conversation
ScratchWikiSkinTemplate.php: * Note that pencil menu may be removed + Include content actions in an explore-tabs div * Divide left and right between discussion and edit main.css: * Refactor a bunch of selectors to not depend on .dropdown-toggle (since it's now possible that that class will be removed from the pencil menu altogether) * Also, what was that idiocy I saw with individually specifying .create, .explore, etc. * Note what to do if pencil menu is removed + New styling for explore-style tabs * Mostly copied from Scratch source * Some explore-specific rules omitted * Some colors no longer specified using transparency * Since MW so conveniently provides a "selected" class in its content-actions, make full use of it instead of Scratch's "active"
Scratch has <a><li> while we have <li><a> Without this change, only the actual text counted as the link Now the whole button properly counts
Viewers don't need them cluttering that space Also handle "viewsource" which is distinct from "edit"
@Ascor8522 Once you figure out how to make MediaWiki's |
It's fairly easy with a bit of css. For example, I changed the dropdown menu only with css, so it must be possible to do the same for other parts of the skin. For the dropdown: ul.dropdown > li[id^=ca-] > a {
content-visibility: hidden; /* hide the previous text, if any */
width: 25px; /* width of the icon */
height: 25px; /* height of the icon */
margin: 5px; /* margin for men */
padding: 0; /* remove the padding of the icons */
background-size: cover; /* make the icon take the whole width and height */
background-position: center; /* center the icon */
}
ul.dropdown {
min-width: unset; /* make the dropdown resize to the fitting width */
} and for every single element of the dropdown ul.dropdown > li[id=ca-nstab-main] > a { /* here, it is the first entry of the dropdown, aka. "Main Page" */
background-image: url(); /* enter the url of the icon here */
} And here is your css dropdown. |
@Ascor8522 Good one! It might also be a good idea to have the icon expand into the text when hovered over (not just hover text). I'll see what I can do with that in the coming days. |
ScratchWikiSkinTemplate.php: - Decided not to remove the pencil menu * Use a hack to add a span inside the <a> for styling purposes resources/css/main.css: * Even padding in icon mode * Default background image is dropdown arrow, to be overridden * Show text on hover, focus, or selected - Decided not to remove the pencil menu
@Ascor8522 I've added the framework - do you mind either finding or making icons (that we're allowed to use, and credit if necessary) to put into the tabs? |
Here's some doctored screenshots:



enwiki homepage, transplanted to my local instance (hence the missing images):
My sandbox, with the pencil menu now just a button:
My sandbox, with the pencil menu shown: