mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-28 16:00:24 +05:30
#116: improve userbar layout for small screens and long nicknames
This commit is contained in:
parent
e0ab116a9a
commit
446bfbaa29
@ -1,15 +1,14 @@
|
||||
.group {
|
||||
position: relative; // это нужно только чтобы postcss не удалял пустой класс и composes мог его схавать
|
||||
}
|
||||
|
||||
.horizontalGroup {
|
||||
composes: group;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.item {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
||||
$borderConfig: 1px solid rgba(#fff, 0.15);
|
||||
|
||||
float: left;
|
||||
border-left: $borderConfig;
|
||||
|
||||
&:last-child {
|
||||
|
@ -27,7 +27,7 @@ export default class LoggedInPanel extends Component {
|
||||
const { user } = this.props;
|
||||
|
||||
return (
|
||||
<div className={buttonGroups.horizontalGroup}>
|
||||
<div className={classNames(buttonGroups.horizontalGroup, styles.loggedInPanel)}>
|
||||
<Link to="/" className={classNames(buttons.green, buttonGroups.item)}>
|
||||
<span className={styles.userIcon} />
|
||||
<span className={styles.userName}>{user.username}</span>
|
||||
|
@ -1,3 +1,6 @@
|
||||
.loggedInPanel {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.userIcon {
|
||||
composes: user from 'components/ui/icons.scss';
|
||||
|
@ -1,2 +1,3 @@
|
||||
.userbar {
|
||||
text-align: right;
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ $userBarHeight: 50px;
|
||||
|
||||
.headerContent {
|
||||
composes: wrapper;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.logo {
|
||||
@ -65,5 +66,8 @@ $userBarHeight: 50px;
|
||||
}
|
||||
|
||||
.userbar {
|
||||
float: right;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: 115px;
|
||||
top: 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user