Template talk:Ruby-ja
Add topicrb element
[edit]<rb> is being used in a manner that causes invalid HTML output.
"Element rb not allowed as child of element ruby in this context."
-- Gadget850 talk 19:46, 14 March 2015 (UTC)
Class furigana
[edit]This template uses the "furigana" CSS class. Where is it defined? --Amir E. Aharoni (talk) 06:22, 18 April 2016 (UTC)
Text above text
[edit]In the example the furigana すべ placed above 全 .. I am wondering if anyone knows if there is a vocabulary term for doing this that we could possibly explain in the template. I figure it is similar to superscript but that is different because while it makes it small and high up, doing so continues it into new space instead of writing the previous word.
I'm hoping to understand how this template does this as it is a useful thing and I was wondering if I could read an article about this type of word formatting on Wikipedia but I'm not sure what it's called so I don't know where. Ranze (talk) 16:18, 30 November 2016 (UTC)
CSS not scope-limited
[edit]
The TemplateStyles for this template uses the selector ruby > rt to make the ruby text larger. However, the problem with this is that the template does not include a selector to limit this styling to the template's own output. This can cause interference with other templates, which might have their own styling applied to the elements. The guideline notes:
Use selectors that are highly likely to be unique to the template being used. This reduces the chance of conflicting CSS rules arising accidentally. Examples: Use .myTemplate-row rather than .row or .myTemplate tr rather than tr.
This template used to have a furigana class added. A unique class should be added to the output markup and the CSS rules changed to target that, e.g. .ruby-ja ruby > rt. Opencooper (talk) 19:56, 15 September 2022 (UTC)
- This has been fixed now – the class used is
.templateruby. Incidentally, this template has apparently been broken for over a year, since February 5th, 2023 – the CSS wasn't being applied, meaning that the ruby text was nigh-unreadably small! That's corrected now, of course. Obskyr (talk) 02:33, 5 April 2024 (UTC)- Thanks for the update. Glad this got fixed. Opencooper (talk) 06:18, 5 April 2024 (UTC)
- The fix got reverted in Special:Diff/1219115151, quote:
furigana is supposed to fit over the kanji as a pronunciation guide. Making the furigana bigger has broken formatting in many templates and tables.
User:Jkudlick, could you please give a couple of examples where the font size change for tag<rt>...</rt>badly affected the output? —andrybak (talk) 08:24, 22 May 2026 (UTC)- @Andrybak: It's been two years since that was done, but I was able to piece together what had happened. The increased size of the furigana was almost the same size as the kanji, which can be confusing when trying to determine if they are separate lines of text or furigana. It also ended up stretching the kanji, which caused issues in tables and other templates in many anime and manga articles when viewing on mobile devices. For example:
- The fix got reverted in Special:Diff/1219115151, quote:
N/a width=200 width=350 Code location with class=templaterubyEnd Tale (cont.) (続・終物語, Zoku Owarimonogatari) End Tale (cont.) (続・終物語, Zoku Owarimonogatari) User:Jkudlick/sandbox/Ruby-ja without class=templaterubyEnd Tale (cont.) (続・終物語, Zoku Owarimonogatari) End Tale (cont.) (続・終物語, Zoku Owarimonogatari) Template:Ruby-ja without {{Ruby-ja}}End Tale (cont.) (続・終物語, Zoku Owarimonogatari) End Tale (cont.) (続・終物語, Zoku Owarimonogatari) N/a - Depending on how wide the columns are, the way the text wraps can become confusing to read. Also notice how wide the kanji is in the top row compared with the "standard" furigana, and even then it still spills over.
- — Jkudlick ⚓ (talk) 16:02, 25 May 2026 (UTC)
- Thanks for the update. Glad this got fixed. Opencooper (talk) 06:18, 5 April 2024 (UTC)