Controlling the way in which Label break long strings

Hi there,

You can control line-break behaviour to a limited extent with CSS. Here’s an article I found on the subject.

Here’s some simple CSS you can add to your theme.css (in the Assets section), which prevents overflow from one column to another:

.anvil-label {
  word-break: break-word;
}

Unfortunately, CSS doesn’t allow you to customise which characters present break-points, so as to break after a / character. (I guess you could do something with unicode zero-width spaces, but this could affect the ability to copy and paste the label value, if that’s something you want to do.)

1 Like