Topic on Project:Support desk

Parser Output Not Properly formatted in CSS

5
162.245.77.13 (talkcontribs)

I'm having an issue with the parser output for TemplateStyles.

The parser doesn't add spaces between the mw-parser-output class and my CSS classes. This messes up the formatting of my templates. I tried adding spaces manually in front of my classes but that doesn't seem to help. Here's an example of the output:

.mw-parser-output .treeview ul{padding:0;margin:0}.mw-parser-output .treeview li{padding:0;margin:0;list-style-type:none;list-style-image:none}.mw-parser-output .treeview li li{background:url("//upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png")no-repeat 0 -2981px;padding-left:21px;text-indent:0.3em}.mw-parser-output .treeview li li:last-child{background-position:0 -5971px}.mw-parser-output .treeview li.emptyline>ul>.mw-empty-elt:first-child+.emptyline,.mw-parser-output .treeview li.emptyline>ul>li:first-child{background-position:0 9px}


Any suggestions on a fix?

162.245.77.13 (talkcontribs)

Apologies. The pasted code doesn't seem to reflect the point I was trying to make.

There isn't actually a space between .mw-parser-output and .treeview when I inspect the page.

Bawolff (talkcontribs)

can you link to an example on your wiki?

206.126.121.37 (talkcontribs)

I operate a private wiki so unfortunately I can't provide a direct link. Would there be any other info I can provide that might be useful?

Bawolff (talkcontribs)

Just to ask the silly question - you're sure there really isn't a space there in the inspect page view, and its not just some weird font thing where the space is really small or something like that?

Reply to "Parser Output Not Properly formatted in CSS"