SPR-863: function "logged in as" in usertools position in safari

This commit is contained in:
Silke Pisulla 2017-03-21 15:17:34 +01:00
commit f707d52f96
2 changed files with 113 additions and 125 deletions

View file

@ -30,6 +30,7 @@
display: block; display: block;
width: auto; width: auto;
min-height: @toggle-size; min-height: @toggle-size;
overflow: hidden;
border: 1px solid @color-border; border: 1px solid @color-border;
border-radius: @border-radius; border-radius: @border-radius;
color: @color-nav; color: @color-nav;
@ -45,79 +46,85 @@
} }
} }
&.noopentasks {
strong {
background-color: @color-site-bg;
}
.num {
background-color: @noopentasks-background; // fix
color: @noopentasks-color; // fix
}
}
&.user { &.user {
position: relative; position: relative;
display: table-cell; display: table-cell;
padding: 1px .2em 0 1px; // 1px for border border: solid 1px @color-border;
border-radius: @border-radius;
padding-right: .3rem;
&::before { @media @screen_min-xxlg {
content: ''; padding-top: .35rem;
position: absolute; }
top: 0;
left: 0; @media @screen_max-xxlg {
right: 0; padding-top: .4rem;
bottom: 0; }
border: solid 1px @color-border;
border-radius: @border-radius; @media @screen_max-xlg {
padding-top: .5rem;
}
@media @screen_max-md {
min-height: @toggle-size;
padding-top: .35rem;
} }
> a { > a {
.display-flex();
.align-items();
position: relative;
min-height: 26px;
overflow: visible;
background: #FFF; // for removing bg-image background: #FFF; // for removing bg-image
border: 0 none; border: 0 none;
text-indent: 0; text-indent: 0;
color: @color-nav; color: @color-nav;
font-size: inherit; font-size: inherit;
margin-top: -1px; // for border margin-right: -.3rem;
margin-right: -.2em;
padding: 0 .2em 0 0; padding: 0 .2em 0 0;
@media @screen_only-lg { @media @screen_min-xxlg {
padding-top: .25rem; margin-top: -.3rem;
}
@media @screen_max-xxlg {
margin-top: -.3rem;
}
@media @screen_max-xlg {
margin-top: -.5rem;
}
@media @screen_max-md {
min-height: (@toggle-size - .1);
margin-top: -.35rem;
} }
&::before { &::before {
content: ''; content: '';
position: absolute; top: -1px;
left: 0; bottom: -1px;
right: 0; left: -1px;
bottom: 0; right: -1px;
display: block; width: auto;
border: solid 1px @color-border; opacity: 0;
border: solid 1px @color-nav-hover;
border-radius: @border-radius; border-radius: @border-radius;
transition: @transition border-color; transform: none;
transition: @transition opacity;
@media @screen_min-xxlg {
top: -3px;
}
@media @screen_max-xxlg {
top: -4px;
}
@media @screen_max-xlg {
top: -3px;
}
} }
&:hover, &:hover,
&:focus, &:focus,
&:active { &:active {
background-color: @color-nav-hover-bg; background-color: @color-nav-hover-bg;
border-color: @color-nav-hover;
color: @color-nav-hover; color: @color-nav-hover;
&::before { &::before {
border-color: @color-nav-hover; opacity: 1;
} }
bdi, bdi,
@ -134,7 +141,6 @@
bdi { bdi {
color: inherit; color: inherit;
display: inline-block; display: inline-block;
padding-top: 1px;
transition: @transition color; transition: @transition color;
} }
@ -143,31 +149,8 @@
.icon-user-circle(); .icon-user-circle();
position: relative; position: relative;
margin: 0 0 .3em .25rem; margin: 0 0 0 .25rem;
padding: 0 .1rem 0 1.3rem;
@media @screen_min-xxlg {
margin-top: 4px;
padding-left: 1.3rem;
}
@media @screen_max-xxlg {
margin-top: 5px;
padding-left: 1.5rem;
}
@media @screen_max-xlg {
margin-top: 5px;
padding-left: 1.5rem;
}
@media @screen_max-md {
min-height: 1.15rem;
margin-top: 5px;
}
@media @screen_max-xxs {
margin-top: 4px;
}
&::before { &::before {
position: absolute; position: absolute;
@ -177,36 +160,17 @@
margin: 0; margin: 0;
transition: @transition color; transition: @transition color;
@media @screen_min-xlg {
top: -2px;
}
@media @screen_max-xlg {
top: -1px;
}
@media @screen_max-md {
top: -2px;
}
}
}
a {
bdi:first-of-type {
@media @screen_min-xxlg { @media @screen_min-xxlg {
margin-top: 5px; top: -.25rem;
} }
@media @screen_max-xxlg { @media @screen_max-xxlg {
margin-top: 6px; top: -.2rem;
} }
@media @screen_max-xlg { @media @screen_max-xxs {
margin-top: 3px; top: -.25rem;
}
@media @screen_max-md {
margin-top: 5px;
} }
} }
} }
@ -241,6 +205,17 @@
margin-bottom: -1px; margin-bottom: -1px;
} }
} // user-task } // user-task
&.noopentasks {
strong {
background-color: @color-site-bg;
}
.num {
background-color: @noopentasks-background; // fix
color: @noopentasks-color; // fix
}
}
} // li } // li
@ -250,7 +225,9 @@
.hide-text-show-before(); .hide-text-show-before();
cursor: pointer; cursor: pointer;
position: relative;
background-color: #fff; background-color: #fff;
line-height: 1;
text-decoration: none; text-decoration: none;
transition: @transition color, @transition background-color, @transition border-color; transition: @transition color, @transition background-color, @transition border-color;
@ -258,26 +235,16 @@
min-width: 2rem; min-width: 2rem;
} }
&::before { &::before {//background-color: deeppink !important;
.center-middle();
content: "?"; content: "?";
display: block; display: block;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
font-size: @font-size-default + (@font-scale-factor * 4); font-size: @font-size-default + (@font-scale-factor * 4);
line-height: 1;
cursor: pointer; cursor: pointer;
margin: 0;
@media @screen_min-xxlg {
margin-top: .15rem;
}
@media @screen_max-xxlg {
margin-top: .25rem;
}
@media @screen_max-md {
margin-top: .15rem;
}
} }
&:hover, &:hover,
@ -296,23 +263,11 @@
/* icon log-out */ /* icon log-out */
&.logout { &.logout {
.icon-logout(); .icon-logout();
&::before {
@media @screen_only-lg {
margin-top: .3rem;
}
}
} }
/* icon log-in */ /* icon log-in */
&.login { &.login {
.icon-login(); .icon-login();
&::before {
@media @screen_only-lg {
margin-top: .3rem;
}
}
} }
/* icon admin */ /* icon admin */
@ -320,9 +275,7 @@
.icon-cog(); .icon-cog();
&::before { &::before {
@media @screen_only-lg { vertical-align: top;
margin-top: .28rem;
}
} }
} }
} // a } // a

View file

@ -191,7 +191,18 @@
color: inherit; color: inherit;
font-size: @font-size-default; font-size: @font-size-default;
margin-top: .3rem;
@media @screen_min-xxlg {
margin-top: .25rem;
}
@media @screen_max-xxlg {
margin-top: .3rem;
}
@media @screen_max-md {
margin-top: .25rem;
}
} }
.hide-text-show-before() { .hide-text-show-before() {
@ -246,13 +257,37 @@
-webkit-flex-direction: @elem; -webkit-flex-direction: @elem;
} }
// default "center"
.justify-content(@elem:center) { .justify-content(@elem:center) {
justify-content: @elem; justify-content: @elem;
-ms-justify-content: @elem; -ms-justify-content: @elem;
-webkit-justify-content: @elem; -webkit-justify-content: @elem;
} }
.align-items(@elem:center) {
align-items: @elem;
-ms-align-items: @elem;
-webkit-align-items: @elem;
}
.flex(@elem:1 0 auto) {
flex: @elem;
-ms-flex: @elem;
-webkit-flex: @elem;
}
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* positioning */
.center-middle() {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
}
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Screenreader / Hide */ /* Screenreader / Hide */