Skip to content

Conversation

@dwjohnston
Copy link
Owner

No description provided.

@dwjohnston dwjohnston self-assigned this Nov 10, 2025
@dwjohnston dwjohnston requested a review from Copilot November 10, 2025 10:58
Copy link
Contributor

Copilot AI left a 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 adds CSS styling to fix width/overflow issues with code blocks in the react-github-permalink component. The changes implement a Stack Overflow solution to properly constrain pre elements within the .rgp-base container.

  • Adds nested CSS rules targeting pre elements within .rgp-base using CSS nesting syntax
  • Implements width constraints using width: 0 and min-width: calc(100% - 2em) with !important flags
  • Includes commented-out code showing alternative approaches that were considered

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

display: block;
overflow-x: auto;
white-space: pre-wrap !important;
/* max-width: calc(100% - 150px); */
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Commented-out code should be removed before merging to production. If this alternative solution needs to be preserved for reference, consider documenting why it was rejected or move it to commit history.

Suggested change
/* max-width: calc(100% - 150px); */

Copilot uses AI. Check for mistakes.
Comment on lines 77 to 80
/* .rgp-base {
max-width: 60%;
} */

Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Commented-out code should be removed before merging to production. If this alternative solution needs to be preserved for reference, consider documenting why it was rejected or move it to commit history.

Suggested change
/* .rgp-base {
max-width: 60%;
} */

Copilot uses AI. Check for mistakes.
Comment on lines 92 to 94
/* .link-wrapper {
max-width: 300px;
} */
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Commented-out code should be removed before merging to production. If this alternative solution needs to be preserved for reference, consider documenting why it was rejected or move it to commit history.

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI commented Nov 10, 2025

@dwjohnston I've opened a new pull request, #259, to work on those changes. Once the pull request is ready, I'll request review from you.

@dwjohnston dwjohnston merged commit a5758a2 into master Nov 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants