Meta Post - Common CSS Hacks

Shrink Pinned Tabs

v1.4+ compatible

.workspace-tab-header:has(.mod-pinned) {
  /* shrink if pinned */
  max-width: 60px !important;

  /* also hide the title of pinned tabs */
  & .workspace-tab-header-inner-title {
    display: none;
  }
}

Result:

Screenshot-25_11_2023-22.48.26

NOTE: there is still a tooltip with the title being shown if you hover the shrunk tab, and unpinning reverts the tab just as expected :kissing_smiling_eyes: :ok_hand:

P.S. this is based on a recent feature request, and honestly I am surprised this wasn’t the default design of Obsidian UI:

1 Like