-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
in-canvas-for-x width:auto instead of width:inherit #11124
Comments
Using |
it won't work if you make like:
Because the in-canvas-for-large will still take over the size of the above div which is large-4 so 33%. it will work if you make it like this:
But then you make even more extra div's then my above example with:
|
Why not add the needed class(es) from the extra divs to the offcanvas div? |
Do you mean that i write a class and overwrite the default value of width:inherit to width:auto? Is there a reason to use width:inherit? If so could you explain me why? |
It is basically a reset and the default behavior and default useragent styles by browser vendors, see https://github.com/zurb/foundation-sites/blob/develop/scss/components/_off-canvas.scss#L414 In my opinion this is highly project related and not a general feature that is needed. What do the others think? @SassNinja @ncoden |
Width's in foundation are for is far is i know always 100%, like for example the cell default behavior. And for the in-canvas-for-x its the other why around. Thats why i find it weird :-) |
Keep in mind that incanvas resets the styles and that breakpoint media rules have a higher specificity than normal classes and selectors. |
@DanielRuf
But i find it a little wonky. |
I've created the in-canvas feature to transform the off-canvas for certain breakpoint into regular page content. So an off-canvas which has become in-canvas is supposed to behave identical to a non off-canvas element. I just tested the setup in talk and can confirm it's not working correctly (a codepen is always appreciated btw). |
@SassNinja next time i will make a codepen. Sorry i forgot about that, i am quite new to this. I know how to make a pull request, but i not sure how to do it the right way here. |
@RvWensen great! It's quite easy:
contribution guide can be found here |
Issue fix. Discussion can be found foundation#11124
How to reproduce this bug:
so:
What should happen:
The off-canvas should be full width if you ask me.
Instead it becomes also a large-4 so 33% of the width of the div it is in.
That because the widht of the class in-canvas-for-large is width:inherit.
So if i want to create what i think in most cases is desired behavior i need to do the following:
idea:
Change width:inherit to width:auto for the class in-canvas-for-x
The text was updated successfully, but these errors were encountered: