Skip to content

Remove necessary set shorthands and defaults#741

Open
Que-tin wants to merge 1 commit into
pierrecomputer:mainfrom
Que-tin:remove-necessary-set-shorthands-and-defaults
Open

Remove necessary set shorthands and defaults#741
Que-tin wants to merge 1 commit into
pierrecomputer:mainfrom
Que-tin:remove-necessary-set-shorthands-and-defaults

Conversation

@Que-tin
Copy link
Copy Markdown

@Que-tin Que-tin commented May 24, 2026

Description

This is the first of a couple isolated PRs to improve the stylings of diffs.

It removes necessary shorthands that under the hood set or reset way too many properties that aren't even used and also removes a couple of stylings that I stumbled upon that are user agent defaults across browsers anyways.

I'll comment each individual change in the PR, check there for more info

Motivation & Context

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality). You must have
    first discussed with the dev team and they should be aware that this PR is
    being opened
  • Breaking change (fix or feature that would change existing functionality).
    You must have first discussed with the dev team and they should be aware
    that this PR is being opened
  • Documentation update

Checklist

  • I have read the
    contributing guidelines
  • My code follows the code style of the project (bun run lint)
  • My code is formatted properly (bun run format)
  • I have updated the documentation accordingly (if applicable)
  • I have added tests to cover my changes (if applicable)
  • All new and existing tests pass (bun run diffs:test)

How was AI used in generating this PR

Not at all.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@Que-tin is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

padding: 0;
display: block;
outline: none;
outline-style: none;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Literally the same, without other properties being set under the hood


[data-code]::-webkit-scrollbar-track {
background: transparent;
background-color: transparent;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Literally the same, without other properties being set under the hood.

Also already commonly used across the file

[data-expand-button],
[data-separator-content] {
display: flex;
flex: 0 0 auto;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This was unnecessary.

flex-grow: 0 is the default.
Same goes with flex-basis: auto.

[data-expand-button] was already setting flex-shrink: 0 individually

[data-separator-content] was overriding the whole thing anyway (see next comment)


[data-separator-content] {
flex: 1 1 auto;
flex-grow: 1;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Same as above

min-width: 0;
text-overflow: ellipsis;
white-space: nowrap;
flex: 0 1 auto;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

These are basically the UA-defaults

display: flex;
align-items: center;
gap: 1ch;
column-gap: 1ch;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

We have a default flexbox no need to set row-gap as well

align-items: center;
justify-content: center;
border: none;
border-style: none;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Same as with outline -> outline-style


[data-header-content] {
display: flex;
flex-direction: row;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

UA-Default

position: relative;
background-color: var(--diffs-bg);
display: flex;
flex-direction: row;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

UA-Default

Comment on lines +1540 to +1541
border-style: none;
background-color: transparent;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Same as at the start

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.

1 participant