Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Feature Request: use width instead of max-width #538

Closed
MarcusMorba opened this issue Dec 15, 2017 · 4 comments
Closed

Feature Request: use width instead of max-width #538

MarcusMorba opened this issue Dec 15, 2017 · 4 comments
Assignees
Labels
can be closed? P1 Urgent issue that should be resolved before the next re-lease

Comments

@MarcusMorba
Copy link

MarcusMorba commented Dec 15, 2017

Bug, feature request, or proposal:

feature request: setting to use "width" instead of "max-width" in the inline -style.

What is the expected behavior?

Be able to add classes using min-width or max-width

What is the current behavior?

Inline styles overwrites the css-class settings.

What are the steps to reproduce?

Providing a StackBlitz (or similar) is the best way to get the team to see your issue.

What is the use-case or motivation for changing an existing behavior?

Depending on the breakpoints I want to define a min-width which is bigger than the default percentage value set via "fxFlex="20": e.g. "... div fxFlex="20" ngClass.lt-lg="fixedWidth_2col" ..."

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.1

Is there anything else we should know?

@ThomasBurleson ThomasBurleson added the P1 Urgent issue that should be resolved before the next re-lease label Dec 15, 2017
@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.13 milestone Dec 15, 2017
@stellasoft-will
Copy link

Also when using a calc(25% -20px) this does not apply max-width or to this guys preference width which would solve "better way of handling gap/gutter #134"

@CaerusKaru
Copy link
Member

Alright, I've looked into this pretty heavily, and this is unlikely to happen. It would throw off basically every flex styling we need. You can see for yourself by applying width instead of max-width to the demos in the demo app. They look terrible.

Some clarification on this issue can be found here.

If you really need your classes to set max-width, I suggest styling with an !important priority on the rules. In the future, we may move to class-based stylings to have reduced specificity, but for the time being, I think this is where this issue stands.

I'll follow-up with @ThomasBurleson next week, but this issue is moot until then.

@CaerusKaru CaerusKaru modified the milestones: v6.0.0-beta.14, Backlog Mar 16, 2018
@MarcusMorba
Copy link
Author

"!important" is what I have used by now, but the need to use it is really bad way of writing CSS/SCSS. I need to check the newer versions, but as our development is currently with Angular 4.x, I mostly use the latest working beta version 10/11. So close it for now.

@CaerusKaru CaerusKaru removed this from the Backlog milestone Dec 19, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
can be closed? P1 Urgent issue that should be resolved before the next re-lease
Projects
None yet
Development

No branches or pull requests

4 participants