1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 12:47:14 +01:00
metamask-extension/ui/components/app/network-display/index.scss
Elliot Winkler d403644e59
Truncate long network names (#12058)
In some languages, network names are longer than the visible width of
the network dropdown. In these cases, the currently selected network will
overflow the bounds of the network dropdown container.

This commit addresses this issue so that the dropdown container will
grow and shrink appropriately, truncating the currently selected network
if needed.
2021-09-13 10:05:53 -06:00

67 lines
1001 B
SCSS

.network-display {
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 10px;
border-radius: 4px;
min-height: 25px;
user-select: none;
&--disabled {
cursor: not-allowed;
}
&--colored {
background-color: lighten(rgb(125, 128, 130), 45%);
}
&--mainnet {
background-color: lighten($blue-lagoon, 68%);
}
&--ropsten {
background-color: lighten($crimson, 45%);
}
&--kovan {
background-color: lighten($purple, 65%);
}
&--rinkeby {
background-color: lighten($tulip-tree, 35%);
}
&--goerli {
background-color: lighten($dodger-blue, 35%);
}
&.chip {
margin: 0;
max-width: 100%;
}
& .chip__label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
& .chip__left-icon {
margin-left: 4px;
}
& .chip__right-icon {
margin-right: 4px;
}
&__icon {
height: 8px;
width: 12px;
display: block;
}
&--clickable {
cursor: pointer;
}
}