-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Fix MS Edge and Firefox issues #342, #388 #393
Changes from 2 commits
cde1078
2170ff4
d910023
ee1cac0
4e914ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,12 @@ $md-input-underline-focused-color: md-color($md-primary); | |
$md-input-underline-disabled-background-image: linear-gradient(to right, | ||
rgba(0,0,0,0.26) 0%, rgba(0,0,0,0.26) 33%, transparent 0%); | ||
|
||
/** | ||
* Removes firefox box-shadow on required fields... | ||
*/ | ||
:-moz-ui-invalid { | ||
box-shadow: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -2 indent There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
} | ||
|
||
/** | ||
* Applies a floating placeholder above the input itself. | ||
|
@@ -33,6 +39,15 @@ $md-input-underline-disabled-background-image: linear-gradient(to right, | |
} | ||
} | ||
|
||
/** | ||
* Applies a floating placeholder above the input before chrome's and safari's auto-fill commits. | ||
* Firefox has selector issues for :-webkit-autofill, thats why this mixin is duplicated and is used seperately below | ||
*/ | ||
%md-input-placeholder-floating-autofill { | ||
visibility: visible; | ||
padding-bottom: 5px; | ||
transform: translateY(-100%) scale(0.75); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't follow the reasoning for why you're duplicating these rules. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jelbourn that helped to split generated css There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jelbourn what about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can just make this a mixin (rather than a placeholder) and use it in both places rather than duplicating it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jelbourn I'm not sure that I clearly understand your note. If you suggest to make one mixin, than it means to rollback change, because it WAS one mixin which doesn't work. Why? It generates joined css, something like this: How to improve? Well, if we split it in two different groups of css Only way i found to create these two groups in rendered css is to make another mixin. That's why it is 'duplicated'. May be there is some other option to force scss compiler render different groups in css when we use 'extend' of mixins? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These definitions are scss placeholders, not mixins, which is the problem. See If you change to a single mixin, it should be fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, now it's clear :) - will update soon There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
:host { | ||
display: inline-block; | ||
|
@@ -143,7 +158,7 @@ $md-input-underline-disabled-background-image: linear-gradient(to right, | |
// Once the autofill is committed, a change event happen and the regular md-input | ||
// classes take over to fulfill this behaviour. | ||
input:-webkit-autofill + .md-input-placeholder { | ||
@extend %md-input-placeholder-floating; | ||
@extend %md-input-placeholder-floating-autofill; | ||
} | ||
|
||
// The underline is what's shown under the input, its prefix and its suffix. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment can be something like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done