I use <code>
in some programming cards. My style is as follows:
code {
padding: 0 3px;
border-radius: 2px;
font-family: "Hack", monospace;
white-space: pre;
color: #4d4d4c;
background-color: #d6d6d6;
}
Unfortunately, on AnkiMobile (but not on desktop) I get unwanted word breaks, as in the following screenshot.
I tried adding word-break: keep-all;
to the style with no success. I’m not very knowledgeable about html or css, but I’m not sure that this is really the issue. On desktop, no matter how I resize the preview window, the words never get broken like this.
Also I just got an iPhone and AnkiMobile for the first time, so I’m not sure if it always was like this. I was previously using AnkiDroid and I had no such issue.
So any advice or workaround will be greatly appreciated. Thanks.