Skip to content

Commit

Permalink
$mol_html_view: sub and sup
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Jun 29, 2024
1 parent ad2d0f6 commit a6ec4bf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html/view/view.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ $mol_html_view $mol_list
sub <= content* /
Inserted* $mol_paragraph
sub <= content* /
Subscript* $mol_view
sub <= content*
Superscript* $mol_view
sub <= content*
Code* $mol_paragraph
sub <= content* /
Link* $mol_link_iconed
Expand Down
16 changes: 16 additions & 0 deletions html/view/view.view.tree.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ namespace $ {
color: $mol_theme.special,
},

Subscript: {
font: {
size: '.75em',
},
position: 'relative',
bottom: '-0.5em',
},

Superscript: {
font: {
size: '.75em',
},
position: 'relative',
top: '-0.25em',
},

Link: {
margin: rem(-.5),
},
Expand Down
6 changes: 6 additions & 0 deletions html/view/view.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ namespace $.$$ {
case 'U':
return [ this.Inserted( node ) ]

case 'SUB':
return [ this.Subscript( node ) ]

case 'SUP':
return [ this.Superscript( node ) ]

case 'A':
return [ this.Link( node ) ]

Expand Down

0 comments on commit a6ec4bf

Please sign in to comment.