cjanssenskire
29 Feb 2012, 5:46 PM
The Question
So I was wondering if someone could explain the reasoning behind the decision to make tabs inside a tab panel absolute positioned rather than simply floating them, which would automatically position them correctly side by side.
Some Additional Thoughts
I fail to see what the benefit of doing all the calculations to position the tabs in the right place absolutely, when the browser does that automatically when the items are floating. Since the internal tab-panel re-sizes itself to the tabs already in the current implementation, their is no fear that a tab will "fall off" because it does not fit.
All i can see is a performance hit from constantly calculating and recalculating where the tabs go, in addition to causing the loss of the ability to simply hide a tab via display: none, and have the tabs instantly adjust their position. Instead you must have a javascript run that once again calculates every tabs position. This also cuts off the ability to control other elements via css, such as creating overlapping tabs (ala chrome) via pure css. Instead you would have to "extend" the class to calculate the position differently.
Summing it all up
So what are the benefits of positioning the tabs (and buttons for that matter) absolute by default and how do these benifits out weight letting the browser simply handle their positioning?
So I was wondering if someone could explain the reasoning behind the decision to make tabs inside a tab panel absolute positioned rather than simply floating them, which would automatically position them correctly side by side.
Some Additional Thoughts
I fail to see what the benefit of doing all the calculations to position the tabs in the right place absolutely, when the browser does that automatically when the items are floating. Since the internal tab-panel re-sizes itself to the tabs already in the current implementation, their is no fear that a tab will "fall off" because it does not fit.
All i can see is a performance hit from constantly calculating and recalculating where the tabs go, in addition to causing the loss of the ability to simply hide a tab via display: none, and have the tabs instantly adjust their position. Instead you must have a javascript run that once again calculates every tabs position. This also cuts off the ability to control other elements via css, such as creating overlapping tabs (ala chrome) via pure css. Instead you would have to "extend" the class to calculate the position differently.
Summing it all up
So what are the benefits of positioning the tabs (and buttons for that matter) absolute by default and how do these benifits out weight letting the browser simply handle their positioning?