-
Notifications
You must be signed in to change notification settings - Fork 31
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
Width wrapping #51
Comments
Hi @qlonik! How about I let you test this usercss style for me. Hopefully you're using Stylus. If so:
/* ==UserStyle==
@name Wikipedia width
@namespace StylishThemes
@version 1.0.0
@description Fix the width of wikipedia body
@author StylishThemes
@var number width "Width" [900, "px"]
==/UserStyle== */
@-moz-document domain("wikipedia.org") {
body {
max-width: var(--width);
margin: 0 auto;
}
#mw-panel {
left: calc(50% - var(--width) / 2);
}
#left-navigation {
margin-left: calc(50% - var(--width) * .305);
}
#right-navigation {
margin-left: 100px;
float: left;
}
} Now in the popup, use the usercss config to modify the default setting of If this works well for you, you can either keep it as a separate style or I'll integrate it into the main dark style once it's been tested and refined. |
Hello, sorry it took me some time to get back. It works pretty well. I've taken couple screenshots. The only weird thing is that top buttons (main page/talk/read/source) and search bar are behaving funny. Also, some nitpicking details is that after resizing like this, I can pretty clearly see outline of the main page box on the left and right of the text - they are very faint light gray and black vertical lines. These lines also disappear after I scroll past the first page, which is weird. |
I updated the css in my first post to include the |
Sorry, I forgot about it. /* ==UserStyle==
@name Wikipedia width
@namespace StylishThemes
@version 1.0.0
@description Fix the width of wikipedia body
@author StylishThemes
@var number width "Width" [900, "px"]
==/UserStyle== */
@-moz-document domain("wikipedia.org") {
body {
max-width: var(--width);
margin: 0 auto;
}
#mw-head {
max-width: var(--width);
right: inherit;
}
#mw-panel {
left: inherit;
}
#mw-content-text p {
text-align: justify;
}
} EDIT: |
This is a nice feature and after testing @qlonik's version from the above comment for some minutes, it seems to work with no problems. It would be nice if this was included in the style, or at least properly published as a separate style if it is deemed out of scope for the dark theme. |
Ive grouped the two generator rules corresponding to this, both are valid URL: StylishThemes/Wikipedia-Dark#51 (comment)
The best we can do for now is add the above style to https://github.com/StylishThemes/Feature-Override-Styles. That is if the popup margin issues are solved. @qionik if you add an exclusion or fix that Ill add it to the repo mentioned above. |
ping |
I tested out the css from my previous comment (unchanged) and it seems that search pop up doesn't have the same issue anymore. My guess is wikipedia changed something and it seems to work now. |
Is this #51 (comment) the correct and final CSS? if so I will publish it in the Feature override repo and ping you when its done. Let me know whcih final CSS it is, thx |
Sorry, forgot to reply. Yes this one : #51 (comment) |
Could you add an option to be able to wrap the text on the page based on some width value (900px or something like this)?
The text was updated successfully, but these errors were encountered: