dotfiles/.config/BetterDiscord/themes/RightAlignedNicks.theme.css

79 lines
2.4 KiB
CSS
Raw Normal View History

/*//META{"name":"Right-aligned Nicks","description":"Nicknames are right-aligned","author":"FichteFoll","version":"0.2.2"}*//
/**
* Nicks are right-aligned, where possible (i.e. compact layout).
* Space for timestamps is also reduced.
*
* Requires compact mode for obvious reasons.
*
* Nicknames that are too long for the associated space
* are collapsed with an ellipse.
* You can adjust the width of the username column
* with a variable in your user css
* or yell at the people until they pick a shorter nick.
*
*/
/* Variables for configuration. You can override these in your user css. */
:root {
/* ch as unit makes the most sense here,
* but doesn't work properly with calculating offset of the .accessory div */
--username-width: 7.3rem;
--timestamp-width: 3rem;
--header-offset: calc(0.3rem + 0.3em); /* first 0.3em from margin-left on timestamp */
/*--username-width: 13ch;
--timestamp-width: 9ch;*/ /* use `6ch` for 24h timestamps */
}
[class*=containerCompact-] { /* accessory */
padding-left: calc(70px - var(--timestamp-default-width) + var(--timestamp-width) + var(--username-width) );
position: relative;
}
[class*=containerCompact-] [class*=timestampCompactBase-] {
float: left;
top: 1.5ex;
width: var(--timestamp-width);
/*text-align: center;*/
}
/*.headerCompact-3wRt2W {*/
[class*=headerCompact-] {
position: absolute;
left: 0;
padding-bottom: 1px; /* for on-hover underline on border; user_style.css */
}
/*.containerCompact-3V0ioj .usernameWrapper-1S-G5O {*/
[class*=headerCompact-] > span {
display: inline-block;
text-align: right;
width: var(--username-width);
overflow: hidden;
text-overflow: ellipsis;
}
[class*=markup-][class*=isCompact-] {
margin-left: 0 !important;
padding-left: calc(var(--username-width) + var(--timestamp-width) + var(--header-offset)) !important;
text-indent: 0;
}
/*.containerCompact-3bB5aN {*/
[class*=containerCompact-][class*=content-] ~ [class*=containerCompact-] {
padding-left: calc(var(--username-width) + var(--timestamp-width) + var(--header-offset) + 0rem);
}
[class*=containerCompact-][class*=container-] [class*=isMentioned-] [class*=markup-] {
/*padding: 0;*/
/*margin: 0;*/
border-right: solid #FAA61A;
border-width: 0 2px;
}
/* Material theme sets this */
.container-1YxwTf h2 {
margin-left: 0;
}