Another "Is this expected behaviour?"

CSS XPP 9.4.1

I have an interesting issue - the XML I have been supplied with has "xxx</close><open>Zzz". The requirement (apart from changing typeface etc) is to add a period and a space so I end up with:

xxx</close>. <open>Zzz

I am generating the period and space in the close::after pseudo-element selector and most of the time it is working perfectly. However if the last word before the </close> is a very long word (and its in 2 columns to a short measure) then the last word will not hyphenate. If I only generate the period and add space manually, either before or after the <open> element then the long word hyphenates perfectly and as expected. However is does act as you would expect if the justification means finishing a line! Interestingly if I remove the space altogether the word xxx.Zzz will hyphenate.

One option would be to transform and add the space but I am very nervous about that is this could cause issues if the XML is inconsistent.

Interested to hear if anyone else has encountered a similar issue.

Chris

Parents
  • Chris,

    I always get very nervous with generating spacebands. In general I think it should be avoided but of course there are the cases that you are forced to do so, like the case you presented here. 
    Have you tried what happens when you enter the (new) -xpp-word in the display property of the <open> element?
    (one would think that it would be best to put in the close::after but the display property is ignored in the ::before or ::after pseudo elements)
    I don't think it will solve your problem but it is certainly worth a try...

Reply
  • Chris,

    I always get very nervous with generating spacebands. In general I think it should be avoided but of course there are the cases that you are forced to do so, like the case you presented here. 
    Have you tried what happens when you enter the (new) -xpp-word in the display property of the <open> element?
    (one would think that it would be best to put in the close::after but the display property is ignored in the ::before or ::after pseudo elements)
    I don't think it will solve your problem but it is certainly worth a try...

Children