Giter Club home page Giter Club logo

Comments (5)

rafaelmardojai avatar rafaelmardojai commented on August 11, 2024 2

I have spent my sunday trying to solve this XD.

Apparently works fine, but maybe is broken in some case, let me know.

Pd: Do we put it directly in theme.css or create a new experimental feature?

/* Center all inside tab */
.tab-content {
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 100% !important;
}

/* Prevent icons size breaking */
.tab-icon-image, .tab-icon-sound, .tab-throbber, .tab-throbber-fallback  {
	min-width: 16px;
}
.tab-close-button {
	min-width: 22px;
}

/* Adjust tab label width */
.tab-label-container {
	min-width: 0 !important;
}

/* Put close button and icon sound to the right  */
.tab-icon-sound[soundplaying="true"] {
	margin-left: auto !important;
}
.tabbrowser-tab:not([soundplaying]) .tab-close-button {
	margin-left: auto !important;
}

/* Force favicon to the center */
.tab-throbber, .tab-throbber-fallback {
	margin-left: auto;
}
.tabbrowser-tab:not([bussy]) .tab-icon-image {
	margin-left: auto;
}

/* If favicon is not present, force tab label to the center */
.tabbrowser-tab .tab-label-container {
	margin-left: auto !important;
}

.tabbrowser-tab[image] .tab-label-container, .tabbrowser-tab[bussy] .tab-label-container  {
	margin-left: 0px !important;
}

/* If close button is not present, don't force favicon to the center */
#tabbrowser-tabs[closebuttons="activetab"] .tabbrowser-tab:not([selected="true"]) .tab-throbber,
#tabbrowser-tabs[closebuttons="activetab"] .tabbrowser-tab:not([selected="true"]) .tab-throbber-fallback,
#tabbrowser-tabs[closebuttons="activetab"] .tabbrowser-tab:not([selected="true"]):not([bussy]) .tab-icon-image,
#tabbrowser-tabs[closebuttons="activetab"] .tabbrowser-tab:not([selected="true"]):not([image]) .tab-label-container {
	margin-left: 0 !important;
}

from firefox-gnome-theme.

lunakurame avatar lunakurame commented on August 11, 2024 1

Thanks! Tab labels should be centered now, like in Epiphany.

from firefox-gnome-theme.

lunakurame avatar lunakurame commented on August 11, 2024 1

That's pretty cool! Just tested it on FF 57, 58 and 59, seems to work nicely. I haven't found any bugs and the code looks solid. It's a standard GTK behavior to center tab labels and it doesn't depend on any specific FF version (unlike client-side decorations), so I think you can add it directly to the theme.css file. Also you can remove what I added in 2a9708a, we don't need it anymore.

from firefox-gnome-theme.

Gert-dev avatar Gert-dev commented on August 11, 2024

Thanks, already looks better!

Also, not sure if this is desired or even possible, but I noticed in Epiphany the (fav)icons are centered as well, next to the centered tab title.

from firefox-gnome-theme.

lunakurame avatar lunakurame commented on August 11, 2024

You're right. I just spent an hour trying to figure it out, but nothing works. Either everything is centered, including the close button and tab mute icon, or the icon isn't. I'm out of ideas so I'll label this issue as "help wanted" and maybe someone figures it out.

from firefox-gnome-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.