Skip to content

Commit 58a66a1

Browse files
committed
feat(app-content): Revise sidebar selection and content edge styling
Main content now has a subtle left divider and rounded left edge next to the navigation. Selected nav and list items use a softly tinted pill instead of a solid primary fill. Signed-off-by: nfebe <fenn25.fn@gmail.com>
1 parent 961fa60 commit 58a66a1

42 files changed

Lines changed: 84 additions & 18 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Žsrc/assets/NcAppNavigationItem.scssβ€Ž

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,30 @@
2828
}
2929
}
3030

31-
// When .active class is applied, change color background of link and utils. The
32-
// !important prevents the focus state to override the active state.
31+
// !important so :focus-within does not override the active state.
3332
&.active {
34-
background-color: var(--color-primary-element) !important;
33+
background-color: color-mix(in srgb, var(--color-primary-element) 16%, transparent) !important;
3534

3635
&:hover {
37-
background-color: var(--color-primary-element-hover) !important;
36+
background-color: color-mix(in srgb, var(--color-primary-element) 25%, transparent) !important;
3837
}
3938

40-
// overwrite active text color
41-
.app-navigation-entry-link, .app-navigation-entry-button {
42-
color: var(--color-primary-element-text) !important;
39+
&:not(.app-navigation-entry--editing) {
40+
.app-navigation-entry-link,
41+
.app-navigation-entry-button {
42+
color: var(--color-main-text) !important;
43+
}
44+
}
45+
46+
&:not(.app-navigation-entry--editing)::before {
47+
content: '';
48+
position: absolute;
49+
inset-block: var(--default-grid-baseline, 4px);
50+
inset-inline-start: 0;
51+
width: 3px;
52+
background-color: var(--color-primary-element);
53+
border-radius: 999px;
54+
animation: nc-nav-stripe-in var(--animation-quick, 200ms) ease-out;
4355
}
4456
}
4557
&:focus-within,
@@ -72,7 +84,7 @@
7284
background-color: var(--color-background-dark) !important;
7385
}
7486
&.active .app-navigation-entry__actions:hover :deep(.button-vue) {
75-
background-color: var(--color-primary-element) !important;
87+
background-color: var(--color-background-dark) !important;
7688
}
7789

7890
/* hide deletion/collapse of subitems */
@@ -227,3 +239,14 @@
227239
}
228240
}
229241
}
242+
243+
@keyframes nc-nav-stripe-in {
244+
from {
245+
transform: scaleY(0);
246+
opacity: 0;
247+
}
248+
to {
249+
transform: scaleY(1);
250+
opacity: 1;
251+
}
252+
}

β€Žsrc/components/NcAppNavigation/NcAppNavigation.vueβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,8 @@ function handleEsc(): void {
354354
user-select: none;
355355
flex-grow: 0;
356356
flex-shrink: 0;
357-
background-color: var(--color-main-background-blur, var(--color-main-background));
358-
-webkit-backdrop-filter: var(--filter-background-blur, none);
359-
backdrop-filter: var(--filter-background-blur, none);
357+
// Frosted chrome lives on NcContent's wrapper; transparent here keeps it flush.
358+
background-color: transparent;
360359
361360
&--closed {
362361
margin-inline-start: calc(-1 * min($navigation-width, var(--app-navigation-max-width)));

β€Žsrc/components/NcAppNavigationItem/NcAppNavigationItem.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Just set the `pinned` prop.
391391
:open="menuOpen"
392392
:forceMenu="forceMenu"
393393
:defaultIcon="menuIcon"
394-
:variant="(to && isActive) || active ? 'tertiary-on-primary' : 'tertiary'"
394+
variant="tertiary"
395395
@update:open="onMenuToggle">
396396
<template #icon>
397397
<!-- @slot Slot for the custom menu icon -->

β€Žsrc/components/NcAppNavigationItem/NcInputConfirmCancel.vueβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ $input-margin: 5px;
137137
138138
form {
139139
display: flex;
140+
align-items: center;
141+
gap: $input-margin;
142+
padding-inline-end: $input-margin;
140143
}
141144
142145
&__input {
@@ -145,6 +148,7 @@ $input-margin: 5px;
145148
font-size: 100% !important;
146149
margin: $input-margin !important;
147150
margin-inline-start: -1px - $input-padding !important;
151+
margin-inline-end: 0 !important;
148152
padding: $input-padding !important;
149153
150154
&:active,
@@ -156,5 +160,12 @@ $input-margin: 5px;
156160
border-color: var(--color-primary-element);
157161
}
158162
}
163+
164+
:deep(.button-vue) {
165+
width: $input-height !important;
166+
min-width: $input-height !important;
167+
height: $input-height !important;
168+
flex: 0 0 $input-height;
169+
}
159170
}
160171
</style>

β€Žsrc/components/NcContent/NcContent.vueβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ function setAppNavigation(value: boolean): void {
190190
padding: var(--body-container-margin)!important;
191191
backdrop-filter: brightness(50%);
192192
}
193+
194+
// Divider only when an open navigation is present, so content is flush otherwise.
195+
@media only screen and (min-width: $breakpoint-mobile) {
196+
.app-navigation:not(.app-navigation--closed):not(.app-navigation--close) ~ .app-content {
197+
border-inline-start: 1px solid var(--color-border);
198+
border-start-start-radius: var(--body-container-radius);
199+
border-end-start-radius: var(--body-container-radius);
200+
}
201+
}
193202
</style>
194203

195204
<style lang="scss" scoped>
@@ -235,6 +244,10 @@ function setAppNavigation(value: boolean): void {
235244
height: var(--body-height);
236245
overflow: hidden;
237246
padding: 0;
247+
// Owned at wrapper level so nav and AppContent rounded-edge cutouts share one surface.
248+
background-color: var(--color-main-background-blur, var(--color-main-background));
249+
backdrop-filter: var(--filter-background-blur, none);
250+
-webkit-backdrop-filter: var(--filter-background-blur, none);
238251
239252
&:not(.with-sidebar--full) {
240253
position: fixed;

β€Žsrc/components/NcListItem/NcListItem.vueβ€Ž

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ The `actions-icon` slot can be used to pass icon to the inner NcActions componen
502502
<NcCounterBubble
503503
v-if="counterNumber !== 0"
504504
:count="counterNumber"
505-
:active="active ?? isActive"
506505
class="list-item-details__counter"
507506
:type="counterType" />
508507

@@ -527,7 +526,6 @@ The `actions-icon` slot can be used to pass icon to the inner NcActions componen
527526
@focusout="handleBlur">
528527
<NcActions
529528
ref="actions"
530-
:primary="active ?? isActive"
531529
:forceMenu="forceMenu"
532530
:aria-label="actionsAriaLabel"
533531
@update:open="handleActionsUpdateOpen">
@@ -854,22 +852,44 @@ export default {
854852
&--active,
855853
&.active {
856854
.list-item {
857-
background-color: var(--color-primary-element);
858-
color: var(--color-primary-element-text) !important;
855+
background-color: color-mix(in srgb, var(--color-primary-element) 16%, transparent);
856+
color: var(--color-main-text) !important;
859857
860858
&:hover,
861859
&:focus-within,
862860
&:has(:focus-visible),
863861
&:has(:active) {
864-
background-color: var(--color-primary-element-hover);
862+
background-color: color-mix(in srgb, var(--color-primary-element) 25%, transparent);
863+
}
864+
865+
&::before {
866+
content: '';
867+
position: absolute;
868+
inset-block: var(--default-grid-baseline, 4px);
869+
inset-inline-start: 0;
870+
width: 3px;
871+
background-color: var(--color-primary-element);
872+
border-radius: 999px;
873+
animation: nc-nav-stripe-in var(--animation-quick, 200ms) ease-out;
865874
}
866875
}
867876
868877
.list-item-content__name,
869878
.list-item-content__subname,
870879
.list-item-content__details,
871880
.list-item-details__details {
872-
color: var(--color-primary-element-text) !important;
881+
color: var(--color-main-text) !important;
882+
}
883+
}
884+
885+
@keyframes nc-nav-stripe-in {
886+
from {
887+
transform: scaleY(0);
888+
opacity: 0;
889+
}
890+
to {
891+
transform: scaleY(1);
892+
opacity: 1;
873893
}
874894
}
875895
.list-item-content__name,

0 commit comments

Comments
Β (0)