Skip to content

Commit

Permalink
Uniformly space out direct descendants of findbar (hbox.findbar-conta…
Browse files Browse the repository at this point in the history
…iner, toolbarbutton (close)). Should fix #3
  • Loading branch information
ravindUwU committed Nov 2, 2024
1 parent d9f158d commit 68fce3c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/refined-findbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ $-checkbox-selectors: (
}

findbar {
$space-unit: 12px;
$space-unit: 8px;

contain: content;
border: 1px solid var(--chrome-content-separator-color);
padding-inline-start: math.div($space-unit, 3);

/* Position */

Expand Down Expand Up @@ -120,6 +119,21 @@ $-checkbox-selectors: (
border: 1px solid ThreeDShadow;
}

// Uniformly pad & space out direct descendants.
& {
gap: $space-unit;
padding: 6px;
padding-inline-start: $space-unit;
padding-inline-end: $space-unit;
}

// Remove horizontal margins of direct descendants because the gap (above) will space them
// out.
& > * {
margin-inline-start: 0 !important;
margin-inline-end: 0 !important;
}

// Findbar controls live within an hbox.findbar-container, which is a flex parent. Remove
// horizontal margins of direct descendants and space them out evenly using gap.
.findbar-container {
Expand Down

1 comment on commit 68fce3c

@ravindUwU
Copy link
Owner Author

Choose a reason for hiding this comment

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

Makes the findbar a few pixels narrower 👇👀

Please sign in to comment.