Skip to content
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

style(actor): fix scrolling #1365

Merged
merged 1 commit into from
Feb 23, 2024
Merged

style(actor): fix scrolling #1365

merged 1 commit into from
Feb 23, 2024

Conversation

wrycu
Copy link
Collaborator

@wrycu wrycu commented Feb 16, 2024

  • fix skill scrolling in default theme

#1351

* fix skill scrolling in default theme

#1351
@wrycu wrycu requested a review from Esrin February 16, 2024 01:34
@sebastiansIT
Copy link

In my opinion, there is a better way fixing this without all these explicit height calculations. Give me some try with flexbox and overflows. Thanks.

@wrycu
Copy link
Collaborator Author

wrycu commented Feb 19, 2024

This PR adds padding; it doesn't do any calculations. The calculation lines were touched because they had trailing spaces and my IDE is set up to strip that.

I'd (personally) suggest another PR to refactor the code, if that's what you want.

@Esrin
Copy link
Collaborator

Esrin commented Feb 19, 2024

I agree that we can do this better (and the system's CSS overall has become a bit of a frankenstein's monster like everything else), but unfortunately even in my new system which uses entirely flexbox, there's no avoiding 1 calc call on height due to a quirk in how Foundry sheets are styled. The alternative is to completely override some core Foundry styling which gets a bit breaky across Foundry updates.

That said, the only adjustment we need to make here is a tweak to the current height calc. Let me have a quick look.

@Esrin
Copy link
Collaborator

Esrin commented Feb 19, 2024

So on closer inspection, the change that broke the existing calculations was this one: #1322

As it altered the height of the header. To cope with it, we really ought to have a fixed header height (preferably in a CSS variable) and just make it scrollable as the Mandar theme has done.

Then for any content height calculation all you need is something like:

  height: calc(100% - (#{$sheet-header-height} + 0.5rem));

In which the 0.5rem adjustment accounts for the Foundry window-header / top bar which throws things out a bit.

All that said, digging through the SCSS files to find this has made me realise what an absolute state they're in... so I'm tempted to say let's just adopt the Mandar theme globally and give ourselves a fresh styling start from there. :P

@Esrin
Copy link
Collaborator

Esrin commented Feb 19, 2024

All things considered, here's my proposed alternative:
#1366

image

@wrycu
Copy link
Collaborator Author

wrycu commented Feb 20, 2024

@Esrin that's fine, but it doesn't solve the bug in this theme (and making the other the default doesn't remove the existing.)

@Esrin
Copy link
Collaborator

Esrin commented Feb 20, 2024

@Esrin that's fine, but it doesn't solve the bug in this theme (and making the other the default doesn't remove the existing.)

Nope, but removing the existing will remove the existing. The linked PR is just step 1.

@wrycu
Copy link
Collaborator Author

wrycu commented Feb 22, 2024

If you are planning on a phased roll-out, this PR should still be approved. If you aren't planning on a phased roll-out, we should update your PR to be more aggressive in removing the default theme @Esrin

@Esrin Esrin merged commit 6b5f110 into main Feb 23, 2024
@Esrin Esrin deleted the actor_sheet_1351 branch February 23, 2024 22:05
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.

3 participants