Skip to content

Pecha.org String Grouping

Lungsang edited this page Dec 18, 2024 · 14 revisions

Description of sefaria's string grouping

Where did string grouping is applied on ?

  • String grouping is mainly applied on webfont.

Why not on string size and other attributes like color ?

  • For string size and colors there is no need to apply grouping as these css can be directly applied on the string classname.

Webfont string grouping logic that sefaria did in css:

  • In css, first it checks whether the language is Tibetan or English * { --tibetan-font-conditional: var(--is-tibetan) var(--tibetan-font); font-family: var(--tibetan-font-conditional), var(--english-font)); }

  • First it will check if a string has --tibetan-font-conditional variable, if doesn't, then --english-font variable will be applied.

  • In var(--is-tibetan) variable, there are all the list of classname that should be applied for tibetan strings

  • In var(--tibetan-font) variable, there are either var(--tibetan-serif-font-family) or var(--tibetan-sans-serif-font-family)

  • In var(--tibetan-serif-font-family) variable, right now we have pass "Monlam Uni OuChan2"

  • In var(--tibetan-sans-serif-font-family) variable, right now we have pass "Monlam-bodyig Regular"

List of applied changes to the strings for pecha.org's need

Clone this wiki locally