Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

CSS only. Translating repcontrol_ elements.

1717072139

Edited 1717072400
nPocTo_4eJI
API Scripter
CSS: .charsheet, .charsheet.lang-en { /* Defaul value */     --repcontrol_add-name: "Add";     --repcontrol_add-width: 4vw; /* Add button width */     --repcontrol_edit-name: "Modify";     --repcontrol_edit-name2: "Done";     --repcontrol_edit-width: 8vw; /* Modify / Done button width */ } .charsheet.lang-ru { /* Translation for RU */     --repcontrol_add-name: "Добавить";     --repcontrol_add-width: 8vw; /* Button width for cases when the translation is longer/shorter than the original */     --repcontrol_edit-name: "Изменить";     --repcontrol_edit-name2: "Принять"; } .charsheet .repcontrol_add { width: var(--repcontrol_add-width); } .charsheet .repcontrol_add::before { content: var(--repcontrol_add-name); } .charsheet .repcontrol_edit { width: var(--repcontrol_edit-width); } .charsheet .repcontrol_edit::before { content: var(--repcontrol_edit-name); } .charsheet .editmode + .repcontrol > .repcontrol_edit::before { content: var(--repcontrol_edit-name2); } .charsheet .repcontrol_add, .charsheet .repcontrol_edit { position: relative; display: flex; justify-content: center; align-items: center; color: transparent; text-shadow: unset; overflow: hidden; background-image: unset; } .charsheet .repcontrol_add::before, .charsheet .repcontrol_edit::before { color: white; /* Any text color you need */ position: absolute; } The style of the buttons themselves is not specified in the example.
1717079732
GiGs
Pro
Sheet Author
API Scripter
What's the question?
GiGs said: What's the question? I did not find information on such a translation anywhere and shared my solution. No question.
1717091525

Edited 1717091597
GiGs
Pro
Sheet Author
API Scripter
Thanks. As an English user, I hadn't realised there was an issue there. Do you mind if I post this solution to my blog? <a href="https://cybersphere.me/roll20-sheet-author-master-list/" rel="nofollow">https://cybersphere.me/roll20-sheet-author-master-list/</a>
GiGs said: Thanks. As an English user, I hadn't realised there was an issue there. Do you mind if I post this solution to my blog? <a href="https://cybersphere.me/roll20-sheet-author-master-list/" rel="nofollow">https://cybersphere.me/roll20-sheet-author-master-list/</a> Of course, it will be great. The only thing is, it won't work until roll20 fixes the "lang-undefined" for the "charsheet" class. To do this, you need to use a small solution:&nbsp; "CSS language specific styling (lang-undefined). Kludge."