-
Couldn't load subscription status.
- Fork 10
[CC Projects] Lines are sometimes off by one line #1264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[CC Projects] Lines are sometimes off by one line #1264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes line number alignment issues in code blocks throughout the editor by standardizing font usage and applying consistent typography styles. The changes address problems where emojis and other content would cause line highlighting to misalign, and removes an unwanted border from code output blocks.
Key changes:
- Centralized font family definitions in a new
_fonts.scssfile with CSS custom properties for consistent font application - Applied design system typography mixins to ensure consistent line spacing across code blocks and instruction panels
- Removed border styling from code output blocks in the instructions panel
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/assets/stylesheets/settings/_fonts.scss | New file defining standardized sans-serif and monospace font stacks |
| src/assets/stylesheets/index.scss | Migrated to use centralized font variables via CSS custom properties |
| src/assets/stylesheets/InternalStyles.scss | Added font variable definitions with fallbacks for web component customization |
| src/assets/stylesheets/Instructions.scss | Applied typography mixins for consistent line spacing and removed border from code output |
| src/assets/stylesheets/EditorPanel.scss | Applied typography mixin to code editor scroller for consistent line height |
| src/assets/stylesheets/Button.scss | Updated to use centralized sans-serif font variable |
| src/assets/stylesheets/AstroPiModel.scss | Updated to use centralized monospace font variable |
| src/assets/stylesheets/App.scss | Updated to use centralized sans-serif font variable |
| CHANGELOG.md | Documented new features and fixed issues |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,2 @@ | |||
| $font-family-sans-serif: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; | |||
| $font-family-monospace: RobotoMono, source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern with this is that it might change the fonts we're using in places like within codemirror, as we were using different monospace fonts in different places - maybe that's okay though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few thoughts/questions
Status
closes #1259, #1253
What's changed
This also unifies the list of fonts used in the Editor to the list in settings/fonts. They can be added-to/changed by setting
--editor-font-family-sans-serifand--editor-font-family-monospace.Screenshots