Skip to content

Commit

Permalink
remove z-index mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
basher committed Nov 8, 2024
1 parent ea621a5 commit 0a964f2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 44 deletions.
13 changes: 10 additions & 3 deletions ui/src/css/base/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ Config settings.
--animation-medium: 250ms ease-in-out;
--animation-slow: 500ms ease-in-out;

/* z-index.
1. Boilerplate uses native HTML <dialog> for modals, so 'z-modal' is probably redundant now.
2. There's a subtle distinction between a modal that sits above everything, and a popup (e.g. dropdown menu). These will probably be replaced by Popover API.
*/
--z-modal: 1000;
--z-popup: 999;
--z-default: 1;
--z-reset: 0;
--z-below: -1;

/* Miscellaneous. */
--media-aspect-ratio: 16/9;
--base-image-path: '../images/interface';
}

/* TODO - refactor mixin */
$grid-item-min-width: 12.5rem !default;
4 changes: 2 additions & 2 deletions ui/src/css/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Dependencies.
inset-inline-start: 0;
padding: var(--gutter-m);
position: absolute;
z-index: z('popup');
z-index: var(--z-popup);
}

.nav__item--has-dropdown {
Expand Down Expand Up @@ -93,7 +93,7 @@ Dependencies.
inset-block-start: 100%;
padding: var(--gutter-m);
position: absolute;
z-index: z('popup');
z-index: var(--z-popup);
}
}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/css/components/_skiplinks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Dependencies.
min-inline-size: 10vw;
padding: var(--gutter-s);
text-align: center;
z-index: z('default') + 1;
z-index: var(--z-default);
}
}
1 change: 0 additions & 1 deletion ui/src/css/mixins/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
@forward 'focus';
@forward 'form-field-reset';
@forward 'off-screen';
@forward 'z-index';
35 changes: 0 additions & 35 deletions ui/src/css/mixins/_z-index.scss

This file was deleted.

4 changes: 2 additions & 2 deletions ui/src/css/web-components/_webui-image-gallery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ webui-image-gallery {
.modal__header {
background: transparent;
padding-block-start: 0;
z-index: z('default');
z-index: var(--z-default);
}

.modal__content {
margin-block-start: 0;
z-index: z('reset');
z-index: var(--z-reset);
}

.modal__close {
Expand Down

0 comments on commit 0a964f2

Please sign in to comment.