damiankorcz / Prism-Theme

A Comprehensive, Highly-Customisable and Elegant Light/Dark Theme for Obsidian.md
https://www.buymeacoffee.com/DamianKorcz
MIT License
369 stars 13 forks source link

How to add the pinned tab feature? #143

Closed connradolisboa closed 11 months ago

connradolisboa commented 11 months ago

What is your request / issue? I want to add the minimal pinned tab feature to the current theme I use (minimal). How do I do that? I use a lot of pinned tabs and was looking around for a long time for it. Funny how by chance I found it and it's not advertised in the theme features,

Describe the solution you'd like Maybe a cssclass? I don't much about it

Describe alternatives you've considered I've asked on Reddit, a guy sent a code to add to a cssclass file but it didn't work This is the snippet: .workspace-tab-header:has(.mod-pinned) { width: 0; }

Additional context [The feature] image

damiankorcz commented 11 months ago

Hi @connradolisboa, Try the following in a CSS snippet:

.workspace .mod-root .workspace-tab-header[data-type="markdown"]:has(.mod-pinned) .workspace-tab-header-inner-icon,
.workspace .mod-root .workspace-tab-header[data-type="empty"]:has(.mod-pinned) .workspace-tab-header-inner-icon {
    display: flex;
}

.workspace-tab-header:has(.mod-pinned) .workspace-tab-header-inner-title {
    display: none;
}

.workspace .mod-root .workspace-tab-header:has(.mod-pinned),
.workspace-tab-header:has(.mod-pinned) .workspace-tab-header-inner {
    flex: unset;
    width: fit-content;
    min-width: unset;
}

I had a quick look with Minimal and it seems to work fine.

connradolisboa commented 11 months ago

It worked. Thanks! Amazing feature you included