Skip to content

Commit

Permalink
fix: annotation - z-index (#1950)
Browse files Browse the repository at this point in the history
  • Loading branch information
udimberto authored and pwizla committed Dec 12, 2023
1 parent 9772945 commit b3df36e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docusaurus/src/components/Annotation/Annotation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export function Annotation({ children, id, width = 320 }) {
style={{
'--strapi-docs-annotation-toggle-icon-rotation': open ? '0deg' : undefined,
'--strapi-docs-annotation-toggle-background': open ? 'var(--strapi-docs-annotation-toggle-background-active)' : undefined,
'--strapi-docs-annotation-toggle-z-index': open ? 'calc(var(--strapi-docs-annotation-z-index) + 2)' : undefined,
}}
>
<svg
Expand Down
5 changes: 3 additions & 2 deletions docusaurus/src/components/Annotation/annotation.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--strapi-docs-annotation-toggle-background-active: var(--custom-selection-background-color);
--strapi-docs-annotation-tooltip-left: calc(var(--ifm-spacing-horizontal) * 2);
--strapi-docs-annotation-tooltip-right: calc(var(--ifm-spacing-horizontal) * 2);
--strapi-docs-annotation-z-index: 20;

position: var(--strapi-docs-annotation-position);

Expand All @@ -26,7 +27,7 @@
margin: 0;
padding: var(--strapi-spacing-2);
margin: calc(var(--strapi-spacing-1) * -1) calc(var(--strapi-spacing-1) * -0.5);
z-index: 20;
z-index: var(--strapi-docs-annotation-toggle-z-index, var(--strapi-docs-annotation-z-index));

&:before {
--strapi-docs-annotation-toggle-background-distance: calc(var(--strapi-spacing-1) / 1.5);
Expand Down Expand Up @@ -67,7 +68,7 @@
top: var(--strapi-docs-annotation-tooltip-top);
left: var(--strapi-docs-annotation-tooltip-left, var(--ifm-spacing-horizontal));
right: var(--strapi-docs-annotation-tooltip-right, var(--ifm-spacing-horizontal));
z-index: 10;
z-index: calc(var(--strapi-docs-annotation-z-index) + 1);
background: var(--ifm-background-color);
color: var(--ifm-font-color-base);
font-size: 90%;
Expand Down
1 change: 1 addition & 0 deletions docusaurus/src/scss/table.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** Component: Table */
table {
min-width: 100%;
overflow: initial; // helps to use <Annotation> component inside a Table

thead {
--ifm-table-background: transparent;
Expand Down

1 comment on commit b3df36e

@vercel
Copy link

@vercel vercel bot commented on b3df36e Dec 13, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

documentation – ./

documentation-git-main-strapijs.vercel.app
docs-vercel-v4.strapi.io
documentation-strapijs.vercel.app

Please sign in to comment.