GithubHelp home page GithubHelp logo

Comments (4)

foxhoundsk avatar foxhoundsk commented on June 10, 2024

I'm now managed to resize the tab by commenting out the following in userChrome.css:

#sidebar,
  #sidebar-header {
    position: relative !important;
    min-width: var(--sidebar-min-width) !important;
    max-width: var(--sidebar-min-width) !important;
  transition: .1s ease .1s;
    z-index:1;
  }

And the default (also the minimum) width of TST is now wider than before.

I still can't figure how this limits the resize operation, could anyone give me a hint?

Thanks!

from firefox_custom_css.

foxhoundsk avatar foxhoundsk commented on June 10, 2024

I just found that maybe the following is suppose to narrowing the TST width when the focus is not in the sidebar:

  #sidebar,
  #sidebar-header {
    position: relative !important;
    min-width: var(--sidebar-min-width) !important;
    max-width: var(--sidebar-min-width) !important;
  transition: .1s ease .1s;
    z-index:1;
  }

  #sidebar-box:hover :-moz-any(#sidebar,#sidebar-header) {
    min-width: var(--sidebar-visible-width) !important;
    max-width: var(--sidebar-visible-width) !important;
    margin-right: calc((var(--sidebar-visible-width) - var(--sidebar-min-width)) * -1) !important;
    z-index:1;
    position: relative !important;
  transition: .21s ease 3.20s;
  }

However, with this, I can't adjust the TST width.

Is it possible that I can adjust the width while keeping the auto sizing of sidebar feature enabled?

Thanks!

from firefox_custom_css.

hakan-demirli avatar hakan-demirli commented on June 10, 2024

Since there were some bugs that I forgot, I disabled the resize feature by limiting the max-min width of the sidebar. But, let me tell you everything I know about the code which I stole from someone else.

As you have noticed by default the size of the sidebar is fixed to --sidebar-min-width.
min-width and max-width properties are set to the same variable. Hence, you can't drag it to increase it's size.

#sidebar,
#sidebar-header {
position: relative !important;
min-width: var(--sidebar-min-width) !important;
max-width: var(--sidebar-min-width) !important;
transition: .1s ease .1s;
z-index:1;
}

You can create another variable --sidebar-max-width and set it to something higher. Lets say 200px.
Assign it to the max-width.

  #sidebar,
  #sidebar-header {
    position: relative !important;
    min-width: var(--sidebar-min-width) !important;
    max-width: var(--sidebar-max-width) !important;
  transition: .1s ease .1s;
    z-index:1;
  }

Now, you can resize the sidebar by mouse as long as it doesn't exceed these two variables.
Also if you hover your mouse over the sidebar for 3 seconds. It will expand or shrink to reach the --sidebar-visible-width, which is 162px.

You can also change the hover time by adjusting this:

transition: .21s ease 3.20s;

Or you can just disable the mouse hover event by removing the whole block.

from firefox_custom_css.

foxhoundsk avatar foxhoundsk commented on June 10, 2024

@hakan-demirli Got it, thank you for the detailed explanation.

from firefox_custom_css.

Related Issues (10)

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.