Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/utils/code-mirror-themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ const BASE_STYLE = {

'& .cm-cc-collapsedLinesInner': {
borderTop: 'none',
paddingTop: '6px',
},
},

Expand Down Expand Up @@ -246,6 +247,7 @@ const BASE_STYLE = {

'& .cm-collapsedRangesInner': {
borderTop: 'none',
paddingTop: '6px',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this magic number come from 🤔 Any way to make this a bit more obvious?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually we don't document things like 1px, 0.5 rem etc. since they directly map to Tailwind units. Anything outside common values is worth looking at - either we change to use the standard ones, or we document well

Copy link
Collaborator Author

@VasylMarchuk VasylMarchuk Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sure, magic number comes from CodeMirror itself where default padding is 5px, and I am making it 6.

I was thinking myself about how to improve this, maybe use CSS variables and calc. The problem is that CodeMirror does not use Tailwind, the values are hardcoded either in default styles or in default theme (which we override), and CodeMirror is kind of it's own separate thing, a subproject inside our project. Can't wait for a chance to extract it into a separate Ember addon and repository, so it doesn't pollute ours with stuff like this.

Will see what I can do with this one.

@rohitpaulk

},
},

Expand Down
Loading