Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] tabs have extra margins when in a toolbar #4420

Closed
KaelWD opened this issue Jun 29, 2018 · 7 comments
Closed

[Bug Report] tabs have extra margins when in a toolbar #4420

KaelWD opened this issue Jun 29, 2018 · 7 comments
Labels
T: regression Something that used to work but we broke

Comments

@KaelWD
Copy link
Member

KaelWD commented Jun 29, 2018

Versions and Environment

Vuetify: 1.1.0-rc.3
Vue: 2.5.16
Browsers: Chrome 67.0.3396.87
OS: Windows 10

Steps to reproduce

Resize to ~1300px width

Expected Behavior

As in 1.0, tabs should be right against the edge: https://codepen.io/anon/pen/qKLNoM?editors=1000

Actual Behavior

There is an extra 24px margin on either side

Reproduction Link

https://codepen.io/anon/pen/yEGJEX?editors=1000

Other comments

#4305 should be reverted, gutters were complex for a reason.
This can't be easily fixed with negative margins.

Mobile:
image

Arrows visible:
image

@KaelWD KaelWD added the T: regression Something that used to work but we broke label Jun 29, 2018
@peluprvi
Copy link
Contributor

peluprvi commented Jul 1, 2018

Between 1264px and 1377px it has an extra extra margin left. Both versions have this behavior.
The regression is the applied gutter which 1.0 doesn't have.

Version fixed codepens:

Things to analise:

@KaelWD
Copy link
Member Author

KaelWD commented Oct 25, 2018

The "extra margin left" is because that is a desktop resolution with overflow, so space is reserved for the scroll arrow. It is not a bug.

#4305 did fix several alignment issues, but it also introduced new ones that are much more difficult to work around. It also still has overrides for specific components that should be right against the edge, so it really just moved the problem somewhere else. All the issues fixed by #4305 could have been resolved without overhauling the existing system.

the user can't remove the padding

Exactly my point. At least the old contextual margins could be overridden with mx-0 for example. Maybe the padding could be moved to the parent container, but then users would have to re-implement gutters if they want to have tabs in the extension and icons above.

(future) MD2 spec has an extra left margin if scrollable

Old MD spec has that too, but john wanted to hide it behind the align-with-title prop for some reason.

@johnleider johnleider mentioned this issue Mar 5, 2019
8 tasks
johnleider added a commit that referenced this issue Mar 5, 2019
* feat(VTabs): initial conversion

* refactor(VTab): add value functionality from existing v-tab

* refactor(VTabs): improve styling, hook up existing functionality, fix slider

* feat(VTab): add hover/focus styles

* docs(Api): remove tabs color

* refactor(VTabs): improve a11y support

* docs(VTabs): update examples

* feat(VTabs): hookup existing functionality

* test(VTabs): move/rename unit tests

* test(VTab): fix unit tests

* test(VTabs): fix unit tests

* chore: remove deprecated files

* chore: cleanup/fix tests

* test(VTab): fix lint

* chore(VTabs): rename index to ts

* chore(VTabs): remove deprecated files

* refactor(VTabs): move height from tab to tab-bar

* fix(VTabs): reset slider if no active tab

BREAKING CHANGE: fixes #5636

* test(VTabs): fix tests

* fix(VTabs): move pseudo to :before

was making other items not clickable

* fix(VItemGroup): derive item index in real time

* chore(VTabs): add comments throughout

* refactor(VTabs): improve scroll arrow functionality

utilize existing computed property, updated tests to accommodate

* feat(VSlideGroup): add rtl support

resolves #6575

* fix(VTabs): add missing scroll into view functionality

fixes #5398

* fix(VTabs): use internalValue for tabs-bar and tabs-items

* fix(VTabsItems): set mandatory prop default false

handled by VTabsBar. If the mandatory value of bar/items are different, causes crash

* fix(VTabs): remove entry animation

* fix(VTabsBar): react to route changes

determine if entered route does not match to existing tab and remove slider/active state

fixes #6505

* docs(VTabs): update examples

* test(VItemGroup): fix test

* fix(VTabs): fix **fixed-tabs** styling

* fix(VTabs): spec improvements

should blur if mouse event similar to v-btn

* docs(VTabs): update examples

* refactor(VTabs): improve initial callSlider process

* fix(VTab): fix icon color with inactive

* refactor(VTabs): quality of live adjustments

* docs(VTabs): update/add more examples

* chore(VTabs): add missing prop language

* docs(VTabs): cleanup descriptions, improve examples

* fix(VTabs): propagate active-class to correct component

* fix(VTabs): apply correct margin with hidden slider

* feat(VTabs): add **vertical** support

resolves #3971

* style(VTabs.spec): fix lint

* style(VTabs): clean-up types

* refactor: simplify ternary

* style(VTab): remove useless code

* style(VWindowItem): clean-up types

* Update packages/vuetify/src/components/VTabs/VTabsBar.ts

Co-Authored-By: johnleider <john@vuetifyjs.com>

* style(VTabsBar): add Route type import

* fix(VTabs): add additional watchers

when grow and showArrows are toggled, should call slider

* style(VTab): use keyCodes util for keydown comparison

* fix(VTabs): rtl mode with **vertical** prop

* style(VTabs): split out variables

* fix(light.scss): use correct tabs color

* fix(VTab): horizontal alignment with **fixed-tabs** in IE11

* style(VTabsBar): improve typings

* docs(VTabs): improve example

* fix(VTabs): add missing disabled styles

* docs(VTabs): fix usage example

* docs(VTabs): fix dynamic example deprecations

* refactor(VTabsBar): apply local class to content for better style scoping

* fix(VTabs): add missing slider property

* style(VTabs): add comment explanations for genItems method

* style(VTabs): improve code readability

* refactor(VSlideGroup): rename prepend -> prev, append -> next to match rest of framework

* refactor(VTabs): change prop names for v-tabs-bar

* docs: update tabs kitchen

* fix(VTab): adjust font size to match spec

* fix(VSlideGroup): adjust flex-basis for prepend/append

* style(VTab): rename base class to **v-tab**

* style(VTabsBar): rename base class to **v-tabs-bar**

* style(VTabsSlider): rename base class to **v-tabs-slider**

* fix(VTab): adjust margin when inside of `v-toolbar`

fixes #4420
@johnleider
Copy link
Member

Fixed in f22d754

@gadelkareem
Copy link

I think this is still happening https://codepen.io/gadelkareem/pen/EqdWYY

@gadelkareem
Copy link

I think the 'v-tabs-bar--is-mobile' class is added on width between 940px and 1400px, something like that. Try changing width and keep your eye on the margin.

@arnovanoordt
Copy link

Same issue. Seems to switch at around 1100px.
Fixed it for now by adding to my css:

.v-tabs-bar.v-tabs-bar--is-mobile .v-tab {
    margin-left: 0px !important;
}

@VIXI0
Copy link

VIXI0 commented Dec 11, 2019

@arnovanoordt that work for me thank U. if they are not fixing this, at least they should put a property to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: regression Something that used to work but we broke
Projects
None yet
Development

No branches or pull requests

6 participants