From 13acc3d6a2969dbc60e22117a42aae1b99d16a9a Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Thu, 28 Dec 2017 14:06:33 +0900 Subject: [PATCH 1/2] init --- .../renderer/components/common/AppHeader.vue | 2 +- app/src/renderer/components/common/AppMenu.vue | 2 +- .../components/common/NiFieldAddon.vue | 2 +- .../renderer/components/common/NiFieldVote.vue | 4 ++-- .../renderer/components/common/NiListItem.vue | 2 +- app/src/renderer/components/common/NiModal.vue | 2 +- .../renderer/components/common/NiModalHelp.vue | 2 +- .../renderer/components/common/NiModalMenu.vue | 2 +- .../renderer/components/common/NiSession.vue | 4 ++-- .../renderer/components/common/NiToolBar.vue | 5 ++--- .../monitor/BlockchainSelectModal.vue | 2 +- .../renderer/components/staking/LiDelegate.vue | 2 +- app/src/renderer/styles/variables.styl | 18 ++++++++++++++++++ 13 files changed, 33 insertions(+), 16 deletions(-) diff --git a/app/src/renderer/components/common/AppHeader.vue b/app/src/renderer/components/common/AppHeader.vue index 7e2d6e18d9..62cfb1ca59 100644 --- a/app/src/renderer/components/common/AppHeader.vue +++ b/app/src/renderer/components/common/AppHeader.vue @@ -58,7 +58,7 @@ export default { @require '~variables' #app-header - z-index 100 + z-index z(appHeader) .container -webkit-app-region: drag diff --git a/app/src/renderer/components/common/AppMenu.vue b/app/src/renderer/components/common/AppMenu.vue index 76fc75cf15..28b3523b04 100644 --- a/app/src/renderer/components/common/AppMenu.vue +++ b/app/src/renderer/components/common/AppMenu.vue @@ -58,7 +58,7 @@ export default { .app-menu background app-bg-alpha - z-index 99 + z-index z(appMenu) user-select none display flex diff --git a/app/src/renderer/components/common/NiFieldAddon.vue b/app/src/renderer/components/common/NiFieldAddon.vue index 2f1916b5af..9ee1afd514 100644 --- a/app/src/renderer/components/common/NiFieldAddon.vue +++ b/app/src/renderer/components/common/NiFieldAddon.vue @@ -16,7 +16,7 @@ export default { .ni-field-addon + .ni-field margin-left -1 * px position relative - z-index 1 + z-index z(default) .ni-field-addon background app-bg diff --git a/app/src/renderer/components/common/NiFieldVote.vue b/app/src/renderer/components/common/NiFieldVote.vue index 1337a20d85..6d54d603a8 100644 --- a/app/src/renderer/components/common/NiFieldVote.vue +++ b/app/src/renderer/components/common/NiFieldVote.vue @@ -64,7 +64,7 @@ export default { .ni-field-vote-dl position relative - z-index 1 + z-index z(default) padding 0 1rem @@ -76,7 +76,7 @@ export default { .ni-field-vote-bar-outer position absolute - z-index 0 + z-index z(zero) width 100% top 0 diff --git a/app/src/renderer/components/common/NiListItem.vue b/app/src/renderer/components/common/NiListItem.vue index 117c8d0aaa..97f040921a 100644 --- a/app/src/renderer/components/common/NiListItem.vue +++ b/app/src/renderer/components/common/NiListItem.vue @@ -97,7 +97,7 @@ export default { height 3rem width bw background transparent - z-index 10 + z-index z(listItem) &.router-link-exact-active .ni-li-title diff --git a/app/src/renderer/components/common/NiModal.vue b/app/src/renderer/components/common/NiModal.vue index cb35040772..6713a81268 100644 --- a/app/src/renderer/components/common/NiModal.vue +++ b/app/src/renderer/components/common/NiModal.vue @@ -36,7 +36,7 @@ export default { position fixed top 0 left 0 - z-index 1000 + z-index z(modal) width 100vw height 100vh diff --git a/app/src/renderer/components/common/NiModalHelp.vue b/app/src/renderer/components/common/NiModalHelp.vue index a93f814a89..81dcba0416 100644 --- a/app/src/renderer/components/common/NiModalHelp.vue +++ b/app/src/renderer/components/common/NiModalHelp.vue @@ -39,7 +39,7 @@ export default { @import '~variables' .ni-modal.ni-modal-help - z-index 1001 + z-index z(modalHelp) .ni-modal-main padding 2rem diff --git a/app/src/renderer/components/common/NiModalMenu.vue b/app/src/renderer/components/common/NiModalMenu.vue index f4908e554c..72be2a2595 100644 --- a/app/src/renderer/components/common/NiModalMenu.vue +++ b/app/src/renderer/components/common/NiModalMenu.vue @@ -13,7 +13,7 @@ export default { .ni-modal-menu background app-bg-alpha - z-index 99 + z-index z(default) user-select none backdrop-filter blur(0.5rem) overflow-y scroll diff --git a/app/src/renderer/components/common/NiSession.vue b/app/src/renderer/components/common/NiSession.vue index 5da572faa8..4610167a6b 100644 --- a/app/src/renderer/components/common/NiSession.vue +++ b/app/src/renderer/components/common/NiSession.vue @@ -44,7 +44,7 @@ export default { .ni-session-wrapper position relative - z-index 1000 + z-index z(modal) .ni-session-backdrop position absolute @@ -81,7 +81,7 @@ export default { position fixed top 0 left 0 - z-index 900 + z-index z(default) background app-bg .ni-session-container diff --git a/app/src/renderer/components/common/NiToolBar.vue b/app/src/renderer/components/common/NiToolBar.vue index 6753206d70..4f8399ce08 100644 --- a/app/src/renderer/components/common/NiToolBar.vue +++ b/app/src/renderer/components/common/NiToolBar.vue @@ -60,7 +60,7 @@ export default { padding 0 0.75rem color txt - z-index 101 + z-index z(goku) white-space nowrap @@ -69,7 +69,6 @@ export default { position absolute top -0.375rem right 1.125rem - z-index 102 // arrow width 0 @@ -99,7 +98,7 @@ export default { @media screen and (max-width: 567px) .ni-tool-bar - z-index 90 + z-index z(shoryuken) position fixed bottom 0 left 0 diff --git a/app/src/renderer/components/monitor/BlockchainSelectModal.vue b/app/src/renderer/components/monitor/BlockchainSelectModal.vue index 3ae491e3bb..34a1f32325 100644 --- a/app/src/renderer/components/monitor/BlockchainSelectModal.vue +++ b/app/src/renderer/components/monitor/BlockchainSelectModal.vue @@ -43,7 +43,7 @@ export default { position absolute top 0 left 0 - z-index 1000 + z-index z(modal) .modal-blockchain-container border-top px solid bc diff --git a/app/src/renderer/components/staking/LiDelegate.vue b/app/src/renderer/components/staking/LiDelegate.vue index f10e6a61fc..cbd030ccb4 100644 --- a/app/src/renderer/components/staking/LiDelegate.vue +++ b/app/src/renderer/components/staking/LiDelegate.vue @@ -96,7 +96,7 @@ export default { position absolute top 0 left 0 - z-index 10 + z-index z(listItem) line-height 3rem color txt diff --git a/app/src/renderer/styles/variables.styl b/app/src/renderer/styles/variables.styl index 41263161e6..82e6d4f851 100644 --- a/app/src/renderer/styles/variables.styl +++ b/app/src/renderer/styles/variables.styl @@ -82,3 +82,21 @@ h3 = 1.25rem h4 = 1.125rem h5 = 1rem h6 = 0.75rem + +//============================================================================== +// z-index + +z-layers = { + modalHelp: 1001, + modal: 1000, + appHeader: 100, + appMenu: 99, + toolBar: 98, + listItem: 10, + default: 1, + zero: 0, + below: -1 +} + +z(layer) + z-layers[layer] From eefb8c66ea8fafcbacf9c8a207cc5488cb9ccf01 Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Thu, 28 Dec 2017 14:08:22 +0900 Subject: [PATCH 2/2] remove goku/shoryuken reference --- app/src/renderer/components/common/NiToolBar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/renderer/components/common/NiToolBar.vue b/app/src/renderer/components/common/NiToolBar.vue index 4f8399ce08..a2515b3674 100644 --- a/app/src/renderer/components/common/NiToolBar.vue +++ b/app/src/renderer/components/common/NiToolBar.vue @@ -60,7 +60,7 @@ export default { padding 0 0.75rem color txt - z-index z(goku) + z-index z(modal) white-space nowrap @@ -98,7 +98,7 @@ export default { @media screen and (max-width: 567px) .ni-tool-bar - z-index z(shoryuken) + z-index z(toolbar) position fixed bottom 0 left 0