Vue-material: [SCSS] md-flex-small bug

Created on 6 May 2017  路  15Comments  路  Source: vuematerial/vue-material

Steps to reproduce

open layout demo page : https://vuematerial.github.io/#/ui-elements/layout

Which browser?

vue-material 0.7.1, Windows 10, Chrome Browser

What is expected?

On Responsive Demo, it must show different layout from md-flex-small and md-flex-medium.

What is actually happening?

there is no different layout between md-flex-small and md-flex-medium.

bug

Most helpful comment

I was going to open an issue on this, but found this one, so I'll add to it instead.
It looks to me like the class definitions for @media break-points are in the generated CSS file in the wrong order.
For example, in my markup I have the following (using Pug):
```
md-layout(
md-flex-small="100"
md-flex-medium="50"
md-flex="33"
)

The resulting markup looks like this:
md-flex-medium-take precedence over themd-flex-small-` definitions. A screen capture shows the problem:
designer

After some testing, it appears to me that this is a problem with all the md-flex break-points. Only the "largest" break-point size take effect in addition to the non-size specified md-flex. So, if you have large, medium, small, and xsmall all specified, only the large will take affect.
Pretty sure they will have to be defined from xsmall through xlarge in ascending order.

All 15 comments

There's no fix yet? The responsiveness seems to be not working =/

Thanks for reporting this issue @primadi ! :D
We'll look into it asap


What do you mean @herlon214 ?

I was going to open an issue on this, but found this one, so I'll add to it instead.
It looks to me like the class definitions for @media break-points are in the generated CSS file in the wrong order.
For example, in my markup I have the following (using Pug):
```
md-layout(
md-flex-small="100"
md-flex-medium="50"
md-flex="33"
)

The resulting markup looks like this:
md-flex-medium-take precedence over themd-flex-small-` definitions. A screen capture shows the problem:
designer

After some testing, it appears to me that this is a problem with all the md-flex break-points. Only the "largest" break-point size take effect in addition to the non-size specified md-flex. So, if you have large, medium, small, and xsmall all specified, only the large will take affect.
Pretty sure they will have to be defined from xsmall through xlarge in ascending order.

I did some more testing, and of course, I'm partially wrong in the last comment. small is the only one that doesn't work right - it always is in the CSS at the end so never takes affect. The others all work properly, so if you user large, medium, xsmall it will have all the break-points set properly.

Hi -- I'm experiencing the same issue. Currently md-flex-small does not take effect on any component. The rest of the breakpoints seem to work great. If anybody has any workarounds that would be fantastic!

@juanfabrega just for workaround issue, you can use css :

$small-size:600px;

.small-visible {
  @media (min-width: $small-size+1) {
    display: none;
  }
}

.small-hide {
  @media (max-width: $small-size) {
    display: none;
  }
}

Hi @primadi, thanks so much for your help here!

I'm not sure I fully understood your suggestion. Any chance you could walk me through what these blocks are accomplishing? Also, are you suggesting I place these within the scoped style of my component? Thanks again!

+1

also this seems to be a duplicate of #546

Same problem.

<md-layout md-gutter>
  <md-layout md-flex-xsmall="50">Test</md-layout>
  <md-layout md-flex-xsmall="25">Test</md-layout>
  <md-layout md-flex-xsmall="25">Test</md-layout>
</md-layout>

This shows as three same width columns (doesn't work for small and xsmall).

To solve the problem, you should look in the Css section of breakpoints, and place at each point a limitation, for example in the small one, you must put @media (min-width: 601px) and (max-width: 944px) , for the medium @media (min-width: 945px) and (max-width: 1264px) and large @media (min-width: 1265px) and (max-width: 1903px).
Sorry for my English

Hello @pablohpsilva, could you enroll to the Hacktoberfest? I think it would help to encourage people to fix these issues.

Same problem here

+1

Version 0.7.5 still has the same problem, md-flex-xsmall & md-flex-medium works fine, but md-flex-small not

Closing this issue as our focus is on the new 1.0.0 version.

Was this page helpful?
0 / 5 - 0 ratings