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
  • I think that putting the -xpp-word property in the "open" tag did not help because you are generating the period and space in the close::after pseudo-element that occurs before that.

    So, the generated space (that ends a word) is still going to occur before the -xpp-word for the "open" tag is ever actually activated (or processed) by composition. I think that the situation hitting the limitation isn't changed because the -xpp-word is not going to activate before the ".<sp>".

    If it did, then potentially you'd get another undesired result with the period pushed by itself to the next line.

    Jonathan Dagresta
    SDL XPP Engineering

    Jonathan Dagresta
    RWS Group/
    XPP Development

Reply
  • I think that putting the -xpp-word property in the "open" tag did not help because you are generating the period and space in the close::after pseudo-element that occurs before that.

    So, the generated space (that ends a word) is still going to occur before the -xpp-word for the "open" tag is ever actually activated (or processed) by composition. I think that the situation hitting the limitation isn't changed because the -xpp-word is not going to activate before the ".<sp>".

    If it did, then potentially you'd get another undesired result with the period pushed by itself to the next line.

    Jonathan Dagresta
    SDL XPP Engineering

    Jonathan Dagresta
    RWS Group/
    XPP Development

Children
  • Jonathan the ".<sp>" is in the ::after pseudo-element and then that is followed by another element that has the -xpp-word in it (not in a pseudo element). which I think is slightly different from what you are saying - but prepared to be told I am wrong!

    It seems that Steve and you are saying slightly different things and that Steve is saying that the -xpp-word was designed to solve this.

    I think I need to wait until you both agree before I start looking at workarounds (which will inevitably involve lots of different transform rules to add the things currently being generated in ::after and ::before pseudo elements (will need to look at over 200 pseudo elements to check we get the right results). I have already done one as a test looking for the close element followed by the open element and placing the full point inside the close and adding a space between. It works a dream but with lots of them I am worried about missing something!