Skip to content

Conversation

@Pytal
Copy link
Member

@Pytal Pytal commented Aug 30, 2024

Summary

  • refactor(style): Remove repeated semicolon

Checklist

@Pytal Pytal added this to the Nextcloud 31 milestone Aug 30, 2024
@Pytal Pytal self-assigned this Aug 30, 2024
@Pytal Pytal force-pushed the fix/line-height-calc branch from c581af1 to b31be49 Compare August 30, 2024 19:41
@Pytal Pytal enabled auto-merge August 30, 2024 20:06
Copy link
Contributor

@susnux susnux left a comment

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.

*/
#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
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));

&: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
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));

@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 29, 2024
@blizzz blizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
This was referenced Jan 21, 2025
@blizzz blizzz mentioned this pull request Jan 29, 2025
1 task
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
@susnux susnux force-pushed the fix/line-height-calc branch from b31be49 to a8b9a96 Compare April 2, 2025 17:17
@susnux susnux requested a review from a team as a code owner April 2, 2025 17:17
@susnux susnux requested review from Altahrim and nfebe and removed request for a team April 2, 2025 17:17
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@susnux susnux force-pushed the fix/line-height-calc branch from a8b9a96 to 9f7d69f Compare April 2, 2025 17:18
@susnux susnux changed the title fix(theming): Fix broken values when using default line height for calculations refactor(style): Remove repeated semicolon Apr 2, 2025
@susnux susnux 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 master Apr 2, 2025
114 of 119 checks passed
@skjnldsv skjnldsv deleted the fix/line-height-calc branch April 2, 2025 17:31
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: theming ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants