Skip to content

refactor(style): Remove repeated semicolon - #47648

Merged
skjnldsv merged 1 commit into
masterfrom
fix/line-height-calc
Apr 2, 2025
Merged

refactor(style): Remove repeated semicolon#47648
skjnldsv merged 1 commit into
masterfrom
fix/line-height-calc

Conversation

@Pytal

@PytalPytal commented Aug 30, 2024

Copy link
Copy Markdown
Member

Summary

  • refactor(style): Remove repeated semicolon

Checklist

@PytalPytal added this to the Nextcloud 31 milestone Aug 30, 2024
@PytalPytal self-assigned this Aug 30, 2024
@Pytal
Pytalforce-pushed the fix/line-height-calc branch from c581af1 to b31be49CompareAugust 30, 2024 19:41
@Pytal
Pytal enabled auto-merge August 30, 2024 20:06

@susnuxsusnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The value is valid, line-height can just be a numeric factor.
This is essential for calculations of different elements with different font sizes, so this is just the relative line height.

See also https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_30.html#line-height


This value default-line-height can be used on any element regardless if the element uses font-size: var(--default-font-size); or font-size: var(--font-size-small).
Instead if you need the line height of an element you do not need any variable, but simply can use 1lh this is the CSS unit for one line height of that element.

Comment threadcore/css/public.scss Outdated
*/
#body-public {
--footer-height: calc(var(--default-line-height) + 2 * var(--default-grid-baseline));;
--footer-height: calc(var(--default-line-height) + 2 * var(--default-grid-baseline));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So instead you need to multiply the line height with the font size, or much easier:

Suggested change
--footer-height: calc(var(--default-line-height) + 2 * var(--default-grid-baseline));
--footer-height: calc(1lh + 2 * var(--default-grid-baseline));

Comment threadcore/css/public.scss Outdated
&:has(.footer__legal-links),
&:has(.footer__simple-sign-up) {
--footer-height: calc(2 * var(--default-line-height) + 3 * var(--default-grid-baseline));;
--footer-height: calc(2 * var(--default-line-height) + 3 * var(--default-grid-baseline));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
--footer-height: calc(2 * var(--default-line-height) + 3 * var(--default-grid-baseline));
--footer-height: calc(2lh + 3 * var(--default-grid-baseline));

@skjnldsvskjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 29, 2024
@blizzzblizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
This was referenced Jan 21, 2025
@blizzzblizzz mentioned this pull request Jan 29, 2025
1 task
@blizzzblizzz modified the milestones: Nextcloud 31, Nextcloud 32Jan 29, 2025
@susnux
susnuxforce-pushed the fix/line-height-calc branch from b31be49 to a8b9a96CompareApril 2, 2025 17:17
@susnux
susnux requested a review from a team as a code ownerApril 2, 2025 17:17
@susnux
susnux requested review from Altahrim and nfebe and removed request for a teamApril 2, 2025 17:17
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@susnux
susnuxforce-pushed the fix/line-height-calc branch from a8b9a96 to 9f7d69fCompareApril 2, 2025 17:18
@susnuxsusnux changed the title fix(theming): Fix broken values when using default line height for calculationsrefactor(style): Remove repeated semicolonApr 2, 2025
@susnuxsusnux added 3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) and removed bug 2. developing Work in progress labels Apr 2, 2025
@skjnldsv
skjnldsv disabled auto-merge April 2, 2025 17:31
@skjnldsv
skjnldsv merged commit 09e200d into masterApr 2, 2025
@skjnldsv
skjnldsv deleted the fix/line-height-calc branch April 2, 2025 17:31
@nextcloud-botnextcloud-bot mentioned this pull request Aug 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: theming♻️ refactorRefactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Pytal@AndyScherzinger@susnux@skjnldsv@blizzz