Skip to content

Commit

Permalink
Merge pull request #12103 from nextcloud/update-border-radius-doc
Browse files Browse the repository at this point in the history
Update border radius documentation with new variables
  • Loading branch information
susnux authored Aug 13, 2024
2 parents cd2c8ae + 9a87818 commit 4d15a99
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ The size of the CSS variable ``--clickable-area`` variable has shrunk from ``44p
This will result in several regressions and paper-cuts in your app that will need to be manually fixed.
It's recommended to:

1) Link the @nextcloud/vue current master to your app (pull often cause fixes are getting in there too);
1) Link the ``@nextcloud/vue`` current master to your app (pull often cause fixes are getting in there too);
2) Do a codebase-wide search of `44px` and replace with the variable `--default-clickable-area` if appropriate;
3) Check for regressions and visual bugs;
4) Report the regression of your app in this issue (you can create a heading with the name of your own app);
5) Also report @nextlcoud/vue library regressions if they're not reported already in their list;
6) Fix regression in your app (only the ones that are unrelated to the @nextcloud/vue components);
5) Also report ``@nextlcoud/vue`` library regressions if they're not reported already in their list;
6) Fix regression in your app (only the ones that are unrelated to the ``@nextcloud/vue`` components);

Line height
^^^^^^^^^^^
Expand All @@ -58,6 +58,25 @@ 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.

Border radius
^^^^^^^^^^^^^

The border radius CSS variables have been refactored:

- Added

- ``--border-radius-small`` was added for smaller elements like chips.
- ``--border-radius-container`` was added for smaller containers like action menus.
- ``--border-radius-container-large`` was added for larger containers like body or modals.
- ``--border-radius-element`` was added for interactive elements such as buttons, input, navigation and list items.

- Deprecated

- ``--border-radius`` is deprecated now in favor of ``--border-radius-small``.
- ``--border-radius-large`` is deprecated now in favor of ``--border-radius-element``.
- ``--border-radius-pill`` is deprecated now in favor of ``--border-radius-element``.
- ``--border-radius-rounded`` is deprecated now in favor of ``--border-radius-container``.

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

Expand Down
10 changes: 4 additions & 6 deletions developer_manual/html_css_design/css.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,13 @@ Element structure variables
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--border-width-element-focused`` | ``2px`` | Border width for interactive elements when focussed (adjusted for accessibility) |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--border-radius`` | ``3px`` | Default border radius |
| ``--border-radius-small`` | ``4px`` | Border radius used for smaller elements |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--border-radius-large`` | ``10px`` | Larger border radius |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--border-radius-rounded`` | ``28px`` | Even larger border radius for elements which should be look rounded |
| ``--border-radius-element`` | ``8px`` | Border radius of interactive elements such as buttons, input, navigation and list items. |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--border-radius-pill`` | ``calc(var(--default-clickable-area) / 2)`` | Border radius for pill-style elements |
| ``--border-radius-container`` | ``12px`` | For smaller containers like action menus. |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--border-radius-element`` | ``8px`` | Border radius of interactive elements such as buttons, input, navigation and list items. |
| ``--border-radius-container-large`` | ``16px`` | For larger containers like body or modals. |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
| ``--default-clickable-area`` | ``34px`` | Default size (width and height) for interactive elements like buttons |
+----------------------------------------------+------------------------------------------------+-----------------------------------------------------------------------------------------------------------+
Expand Down

0 comments on commit 4d15a99

Please sign in to comment.