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

docs(upgrade_to_30): add line-height change docs #12082

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,39 @@ Font sizes
^^^^^^^^^^

Nextcloud now provides meaningful default styles for heading elements.

This can cause visual regressions if your code does not explicitly set font size and weight.
If you need to use heading elements outside of text content, you might need to adjust their styles.

Line height
^^^^^^^^^^^

``--default-line-height`` CSS variable is a unitless value ``1.5`` instead of a unit value ``24px``:

- *line-height* of an element with a non-default font size is now adjusted to the element's font size
- Unit calculation isn't valid anymore. Use `lh <https://developer.mozilla.org/en-US/docs/Web/CSS/length#lh>`_ unit instead.

.. code-block:: diff

element1 {
/* Invalid CSS calculation. Use lh unit instead */
- height: calc(var(--default-line-height) * 2);
+ height: 2lh;

- padding-left: calc(var(--default-line-height) + 10px);
+ padding-left: calc(1lh + 10px);
}

element2 {
font-size: calc(var(--default-font-size), 2);

/* Valid usage. No changes are needed if the font-size is default. */
line-height: calc(var(--default-line-height) * 2);

/* No line-height adjustment is needed anymore */
- line-height: calc(var(--default-line-height), 2);
}

Added APIs
^^^^^^^^^^

Expand Down