tmedwards / sugarcube-2

SugarCube is a free (gratis and libre) story format for Twine/Twee.
https://www.motoslave.net/sugarcube/2/
BSD 2-Clause "Simplified" License
177 stars 41 forks source link

nobr breaks css #170

Closed Muderru closed 2 years ago

Muderru commented 2 years ago

Describe the bug. I have gradient background background: radial-gradient(ellipse at center, var(--color1) 0%,var(--color2) 40%,var(--color3) 100%);. Without nobr macros everything looks fine. But if I use nobr in tags or passage body gradient is split up on repeating block areas.

Expected behavior. I want my page graphically looks the same with and without nobr.

Screenshots. Without nobr twine1 With nobr twine2

Project details.

Desktop details.

tmedwards commented 2 years ago

You're going to need to show more details than that.

  1. What do the whole CSS rule(s) look like, don't just show some properties, and where are you setting those rule(s)?
  2. What does the contents of that passage look like?
hituro commented 2 years ago

I think this is a css issue. I get the same effect if I don't supply a background-size property to the gradient. Probably an instance of the bug described here: https://stackoverflow.com/questions/43297619/why-doesnt-background-size-100-100-work-anymore-in-firefox

The following works in Firefox (assuming the style is applied to body)

background: radial-gradient(ellipse at center, red 0%,blue 40%,green 100%);
background-size: 100vw 100vh;

Without the background-size I get the same stripes, even if the passage is empty

Muderru commented 2 years ago

Thanks, background-size: 100vw 100vh; is help. On Edge it works too.

  1. What do the whole CSS rule(s) look like, don't just show some properties, and where are you setting those rule(s)?

I use slightly modified Bleached style where solid colors are replaced on gradients.

2. What does the contents of that passage look like?

Invisible initialized loop.

tmedwards commented 2 years ago

Apparently this was a CSS issue.