Skip to content

Commit

Permalink
$mol_text_code: fixed naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Dec 13, 2024
1 parent 381921e commit e2cb0e3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion text/code/code.view.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ namespace $.$$ {
padding: $mol_gap.text,
},

Row: {
font: {
family: 'inherit',
},
},

Copy: {
alignSelf: 'flex-start',
justifySelf: 'flex-start',
Expand All @@ -21,7 +27,7 @@ namespace $.$$ {
'@': {
'mol_text_code_sidebar_showed': {
true: {
$mol_text_code_row: {
$mol_text_code_line: {
margin: {
left: rem(1.75),
},
Expand Down
2 changes: 1 addition & 1 deletion text/code/code.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $mol_text_code $mol_stack
<= Rows $mol_list
render_visible_only <= render_visible_only false
rows <= rows /
<= Row*0 $mol_text_code_row
<= Row*0 $mol_text_code_line
numb_showed <= sidebar_showed
numb <= row_numb* 0
text <= row_text* \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ namespace $.$$ {

const { rem } = $mol_style_unit

$mol_style_define( $mol_text_code_row, {
$mol_style_define( $mol_text_code_line, {

display: 'block',
position: 'relative',

font: {
family: 'inherit',
family: 'monospace',
},

Numb: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$mol_text_code_row $mol_paragraph
$mol_text_code_line $mol_paragraph
text \
minimal_height 24
numb_showed true
Expand Down
2 changes: 1 addition & 1 deletion text/code/row/row.view.ts → text/code/line/line.view.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace $.$$ {

export class $mol_text_code_row extends $.$mol_text_code_row {
export class $mol_text_code_line extends $.$mol_text_code_line {

maximal_width() {
return this.text().length * this.letter_width()
Expand Down
2 changes: 1 addition & 1 deletion text/text/text.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $mol_text $mol_list
dom_name \span
type <= line_type* \
sub <= line_content* /
Code_line* $mol_text_code_row
Code_line* $mol_text_code_line
numb_showed false
highlight <= highlight \
text <= line_text* \
Expand Down

0 comments on commit e2cb0e3

Please sign in to comment.