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
Make sign-in UI consistent (IE11 rendered poorly) #392
Changes from 2 commits
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 |
---|---|---|
|
@@ -4,16 +4,40 @@ | |
} | ||
} | ||
|
||
#sign-in { | ||
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. one school of thought I've seen is that using IDs for styles is an anti-pattern because it means things are not repeatable. What do you think of making this like 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. As I see this element being unique in the long-term, I felt the id attribute was appropriate. If we ever needed to add another similar element, at that time we'd certainly change the id to a class, but I'm fine doing that now to save an extra step later. |
||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.sign-in-logo { | ||
background-color: transparent; | ||
width: 103px; | ||
height: 27px; | ||
padding: 6px; | ||
border-color: map-get($site-palette, 'site-light-blue'); | ||
padding: 7px 6px 6px; | ||
margin-left: 0.2rem; | ||
border: 1px solid map-get($site-palette, 'site-light-blue'); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
&:hover { | ||
border-color: $blue; | ||
} | ||
|
||
a { | ||
font-size: 1.28rem; | ||
color: transparent; | ||
|
||
&:hover { | ||
color: transparent; | ||
} | ||
} | ||
} | ||
|
||
.usa-search [type=search] { | ||
height: 2rem; | ||
border-top-right-radius: 0; | ||
border-bottom-right-radius: 0; | ||
} | ||
|
||
.logo { | ||
|
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.
I feel like it's generally an anti-pattern to do direct
style
attributes in HTML for things we can manage in the stylesheets.Was the reason for doing this to get the asset URL correct? If so, it looks like other background URLs in our stylesheets seem to do relative URLs, ex
url(../img/alerts/warning.svg)
, have we given that a shot?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.
Thanks for pointing this out - I originally had this rule in a stylesheet but the url path was incorrect. I should have looked through the other files for a correct example. I will revert/correct this change. I agree with you that inline styles are best avoided when possible.