Skip to content

Style (pane) separators and sidebars#850

Merged
danirabbit merged 10 commits intoelementary:mainfrom
wpkelso:styles-separator
Apr 24, 2025
Merged

Style (pane) separators and sidebars#850
danirabbit merged 10 commits intoelementary:mainfrom
wpkelso:styles-separator

Conversation

@wpkelso
Copy link
Member

@wpkelso wpkelso commented Apr 23, 2025

image

@wpkelso wpkelso requested a review from a team April 23, 2025 20:34
@wpkelso wpkelso changed the title Style seprators and sidebars Style separators and sidebars Apr 23, 2025
@wpkelso wpkelso requested review from a team and removed request for a team April 23, 2025 21:29
@wpkelso wpkelso requested a review from danirabbit April 24, 2025 00:42
Comment on lines 10 to 24
& row {
padding: rem(6px) rem(12px);
background-color: inherit;

transition: all duration("in-place") easing();

&:hover {
background-color: $highlight_color;
}

&:selected {
// FIXME: replace with translucent/brighter accent color
background-color: bg-color(4);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it should be in stacksidebar.sidebar since otherwise this would effect Granite.ListItem styles in a sidebar using those widgets

Copy link
Member

Choose a reason for hiding this comment

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

There's probably a better way to abstract these styles, but what do you think about how this looks?

stacksidebar.sidebar {
    background: none;
    box-shadow: none;

    .navigation-sidebar {
        margin: $button-spacing;

        row {
            @extend .model;

            border-spacing: $button-spacing;
            min-width: rem(150px);

            &:active {
                // There's an optical illusion because items are wider than
                // they are tall, so compensate by scaling y a little extra
                transform: scale(0.98, 0.96);
            }

            &:selected {
                @extend selection;
            }
        }
    }
}

Copy link
Member Author

@wpkelso wpkelso Apr 24, 2025

Choose a reason for hiding this comment

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

I like it—the bounce is very satisfying. selected looks pretty awful in dark mode for text, though:
image

I think in this case, we probably want to use the standard $fg-color for selected instead of the shaded accent colour.

Copy link
Member

Choose a reason for hiding this comment

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

Ah yeah I'll propose a branch to fix the selected styles. I forgot to add the dark one

@wpkelso
Copy link
Member Author

wpkelso commented Apr 24, 2025

image
image

I've initially taken a flatter approach to this, but could re-add the shadow we had in the old stylesheet to the separators; I have no preference between the two approaches.

@wpkelso wpkelso changed the title Style separators and sidebars Style (pane) separators and sidebars Apr 24, 2025
@wpkelso wpkelso requested a review from danirabbit April 24, 2025 03:06
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

Let's go 🚀

@danirabbit danirabbit merged commit 47e8a71 into elementary:main Apr 24, 2025
4 checks passed
@wpkelso wpkelso deleted the styles-separator branch April 24, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants