Apologies if this isn't the correct board. I read the descriptions and it wasn't entirely clear to me where this would go.
So, I have already come up with this CSS and was wondering if it would be a decent candidate to add to this wiki.
What does it do? It fixes what I believe to be some display issues with the syntaxhighlight/source tag under certain conditions. Specifically:
Line numbers longer than 2 digits
Horizontal scrolling when highlighting is in use
From what I can tell, there is no visually discernible change when these conditions aren't met; so it shouldn't cause any odd display behavior unless interacting with other CSS (such as Nord or GeSHiStyles).
If it would be a good idea to add it, how do I do that? Is it just as simple as creating the documentation and stylesheet as described here or is there more to it?
Apparently the line numbers aren't too much of an issue in threads. But if you test it on a normal page you can see what I am talking about. Also make sure to disable personal and site CSS/JS. Apparently Community Central already has some CSS that mitigates some of the display issue. Not sure if the same is true here.
if "to add to this wiki" means "add to sitewide styles", then it would be not so good idea as meets the eye. because of specific of this wiki: doc pages here might be used as a demo for the script/style. while style itself is useful, using it sitewide on this wiki might interfere with demos.
Yeah, sorry about the confusion. What I meant by "add to this wiki" was adding as something users can copy/import to their own wiki or personal CSS; not necessarily something that this wiki itself would use. I could definitely add it to the cookbook; there definitely isn't a whole lot to say about it so a while separate documentation page does seem unnecessary. What section would you think it belongs to best? It could be used for both site enhancement or user customization.
Okay. But what is the deciding factor for where something goes? From the looks of it, there are some demos that specify just JS but they are still in the .js.
Okay, I added it under site enhancements for now. I tried to include my example from above but there seems to be some site-specific CSS that is being applied. I tried using ?usesitecss=0&useusercss=0&usesitejs=0&useuserjs=0 as well as disabling the various gadgets but I can't seem to prevent it from being applied. It is a bit annoying as it hides (i.e. you don't see it here) the 2-digit cut-off issue I mentioned. However, you can try the example on most other wikis and you would be able to see what I am talking about.
But what is the deciding factor for where something goes? From the looks of it, there are some demos that specify just JS but they are still in the .js.
if script myscript.js has demo page myscript and there is no any special conditions, then the script might be placed into custom-. all other instances that u see in the .js are special ones: demo pagename is not equal to script name, script has special prerequsities to run, etc.