Skip to content

Commit 0da4202

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 0da4202

9 files changed

Lines changed: 51 additions & 15 deletions

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

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,32 @@
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+
position: relative;
43+
color: var(--color-main-text) !important;
44+
45+
&::before {
46+
content: '';
47+
position: absolute;
48+
inset-block: var(--default-grid-baseline, 4px);
49+
inset-inline-start: 0;
50+
width: 3px;
51+
background-color: var(--color-primary-element);
52+
border-start-end-radius: 2px;
53+
border-end-end-radius: 2px;
54+
animation: nc-nav-stripe-in var(--animation-quick, 200ms) ease-out;
55+
}
56+
}
4357
}
4458
}
4559
&:focus-within,
@@ -72,7 +86,7 @@
7286
background-color: var(--color-background-dark) !important;
7387
}
7488
&.active .app-navigation-entry__actions:hover :deep(.button-vue) {
75-
background-color: var(--color-primary-element) !important;
89+
background-color: var(--color-primary-element-light-hover) !important;
7690
}
7791

7892
/* hide deletion/collapse of subitems */
@@ -227,3 +241,14 @@
227241
}
228242
}
229243
}
244+
245+
@keyframes nc-nav-stripe-in {
246+
from {
247+
transform: scaleY(0);
248+
opacity: 0;
249+
}
250+
to {
251+
transform: scaleY(1);
252+
opacity: 1;
253+
}
254+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,12 @@ export default {
466466
&:not(.app-content--has-list) {
467467
overflow: auto;
468468
}
469+
470+
@media only screen and (min-width: $breakpoint-mobile) {
471+
border-inline-start: 1px solid var(--color-border);
472+
border-start-start-radius: var(--body-container-radius);
473+
border-end-start-radius: var(--body-container-radius);
474+
}
469475
}
470476
471477
.app-content-wrapper {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ 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; staying transparent
358+
// keeps the nav and the rounded-edge cutouts on one surface.
359+
background-color: transparent;
360360
361361
&--closed {
362362
margin-inline-start: calc(-1 * min($navigation-width, var(--app-navigation-max-width)));

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ function setAppNavigation(value: boolean): void {
235235
height: var(--body-height);
236236
overflow: hidden;
237237
padding: 0;
238+
// Frosted chrome owned at wrapper level so the nav area and the
239+
// cutouts from NcAppContent's rounded start-edges share one surface.
240+
background-color: var(--color-main-background-blur, var(--color-main-background));
241+
backdrop-filter: var(--filter-background-blur, none);
242+
-webkit-backdrop-filter: var(--filter-background-blur, none);
238243
239244
&:not(.with-sidebar--full) {
240245
position: fixed;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,22 +854,22 @@ export default {
854854
&--active,
855855
&.active {
856856
.list-item {
857-
background-color: var(--color-primary-element);
858-
color: var(--color-primary-element-text) !important;
857+
background-color: var(--color-primary-element-light);
858+
color: var(--color-primary-element-light-text) !important;
859859
860860
&:hover,
861861
&:focus-within,
862862
&:has(:focus-visible),
863863
&:has(:active) {
864-
background-color: var(--color-primary-element-hover);
864+
background-color: var(--color-primary-element-light-hover);
865865
}
866866
}
867867
868868
.list-item-content__name,
869869
.list-item-content__subname,
870870
.list-item-content__details,
871871
.list-item-details__details {
872-
color: var(--color-primary-element-text) !important;
872+
color: var(--color-primary-element-light-text) !important;
873873
}
874874
}
875875
.list-item-content__name,
Loading
Loading
Loading
Loading

0 commit comments

Comments
Β (0)