From 4918f31c8240f931ba708796b5828097fd2d8001 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Thu, 8 Dec 2022 16:19:36 +0200 Subject: [PATCH] Improvements for centered_tab_label.css This patch makes tab label work better when label has rtl text. Secondary tab label (like "muted" etc.) is now also centered. --- chrome/centered_tab_label.css | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/chrome/centered_tab_label.css b/chrome/centered_tab_label.css index 4166f7f..6ee51af 100644 --- a/chrome/centered_tab_label.css +++ b/chrome/centered_tab_label.css @@ -1,7 +1,20 @@ /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/centered_tab_label.css made available under Mozilla Public License v. 2.0 See the above repository for updates as well as full license text. */ -.tab-label-container{ display: grid; justify-content: safe center; align-items: safe center; } -.tab-label,.tab-secondary-label{ overflow: hidden } -.tabbrowser-tab[selected]:not(:hover) .tab-label-container, -#tabbrowser-tabs:not([closebuttons="activetab"]) .tabbrowser-tab:not(:hover,[pinned]) .tab-label-container{ margin-inline-end: 7px } +.tab-label-container{ + display: grid; + justify-content: safe center; + align-items: safe center; +} + +.tab-secondary-label{ + -moz-box-pack: center; +} + +.tab-label, +.tab-secondary-label{ overflow: hidden } + +.tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([labeldirection="rtl"]), +#tabbrowser-tabs:not([closebuttons="activetab"]) .tabbrowser-tab:not(:hover,[pinned]) .tab-label-container:not([labeldirection="rtl"]){ + margin-inline-end: 7px; +}