Files
wekan/client/components/notifications/notificationsDrawer.css
T
Lauri Ojansivu d5b69137cc Font size setting moves all of the text, not the part written in rem.
Picking Largest grew the page heading and the minicards and left the header
bar, the left menu, the lists, the swimlane header and every popup exactly as
they were.

The preset was a percentage on the root element, and a root percentage only
reaches text whose size is written in a relative unit: rem is measured against
the root, em against its parent. WeKan writes most of its sizes in px, and px
is absolute, so exactly the rem-sized parts scaled. The base rule made it
worse: html, body, input, select, textarea, button re-stated font: 14px, so the
body took the stock size straight back off the scaled root.

The preset is published as a number as well (--wekan-ui-font-scale), and every
px font-size and line-height in the client stylesheets - 433 declarations
across 37 files - is written calc(14px * var(--wekan-ui-font-scale, 1)).
line-height scales with the size on purpose: 21px of type in an 18px line box
is the same setting half-applied. The base font rule is split into font-family
and font-size, because the shorthand's size was the one thing the setting had
to be able to move.

Nothing renders differently until a preset is chosen: the fallback is 1 and the
variable is removed for Default. tests/uiFonts.test.cjs fails on any bare px
font-size or line-height, so a new one cannot quietly opt out of the setting;
the two density guards unwrap the calc as they read the file, so each still
pins the size it means.

Thanks to xet7 !
2026-08-14 18:06:10 +03:00

136 lines
4.8 KiB
CSS

/* It starts below the header, and the header is NOT 48px tall.
`top: 48px` was a guess at the height of one bar, and the first header bar
wraps to a second and a third row - so on any window where it did, the bar's
own contents came down over this panel: the user avatar, the tallest thing in
it, sat on top of this header beside the ✕ that closes it.
`--wekan-header-height` is what the header MEASURES itself to be, kept current
by a ResizeObserver (client/lib/utils.js), and it is what everything else laid
out against the viewport already uses. docs/Design/Page/Header.md */
section#notifications-drawer {
position: fixed;
top: var(--wekan-header-height, 48px);
inset-inline-end: 0;
width: 100vw;
max-width: 100vw;
background-color: #fafafa;
box-shadow: 0 1px 2px rgba(0,0,0,0.15);
border-radius: 2px;
/* ...and what is left of the window below it, for the same reason: the old
`100vh - 28px - 36px` was that guess again, in two pieces. */
max-height: calc(100vh - var(--wekan-header-height, 48px));
color: #000;
padding-top: 36px;
}
section#notifications-drawer a:hover {
color: #2980b9 !important;
}
section#notifications-drawer .header {
position: fixed;
/* The panel's own header is fixed too, so it follows the same measurement -
it is the row the ✕ is in, and it is what the avatar used to overlap. */
top: var(--wekan-header-height, 48px);
inset-inline-end: 0;
width: 100vw;
box-sizing: border-box;
padding: 8px 16px;
background: #ededed;
border-bottom: 1px solid #dbdbdb;
z-index: 2;
/* Flex row: hamburger (left), title (centre), X (right), all vertically centred. */
display: flex;
align-items: center;
}
section#notifications-drawer .header .notification-menu-toggle {
font-size: calc(20px * var(--wekan-ui-font-scale, 1));
cursor: pointer;
color: #000 !important; /* black hamburger menu (override themed white link colour) */
line-height: calc(24px * var(--wekan-ui-font-scale, 1));
}
section#notifications-drawer .header .notification-menu-toggle:hover {
color: #2980b9;
}
section#notifications-drawer .header .notification-menu {
position: absolute;
inset-inline-start: 16px;
top: 44px;
background: white;
border: 1px solid #dbdbdb;
border-radius: 3px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
min-width: 220px;
z-index: 100;
display: none;
}
section#notifications-drawer .header .notification-menu.is-open {
display: block;
}
section#notifications-drawer .header .notification-menu .menu-section {
padding: 4px 0;
}
section#notifications-drawer .header .notification-menu .menu-divider {
border-top: 1px solid #dbdbdb;
margin: 4px 0;
}
section#notifications-drawer .header .notification-menu .menu-item {
display: flex;
align-items: center;
padding: 8px 12px;
cursor: pointer;
color: #333;
white-space: nowrap;
}
section#notifications-drawer .header .notification-menu .menu-item:hover {
background-color: #f5f5f5;
}
section#notifications-drawer .header .notification-menu .menu-item.selected {
background-color: #e8f4f8;
}
section#notifications-drawer .header .notification-menu .menu-item .check-icon {
width: 20px;
min-width: 20px;
margin-inline-end: 8px;
text-align: center;
color: #2980b9;
font-weight: bold;
}
section#notifications-drawer .header .notification-menu .menu-item .menu-icon {
margin-inline-end: 8px;
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
}
/* Menu-item icons (envelope / copy / trash / check) black. */
section#notifications-drawer .header .notification-menu .menu-item .menu-icon,
section#notifications-drawer .header .notification-menu .menu-item .menu-icon i.fa,
section#notifications-drawer .header .notification-menu .menu-item .check-icon,
section#notifications-drawer .header .notification-menu .menu-item .check-icon i.fa {
color: #000 !important;
}
section#notifications-drawer .header h5 {
flex: 1; /* fill the middle so the title is centred, X sits at the right */
text-align: center;
margin: 0;
}
section#notifications-drawer .header .close {
/* Flex item at the right edge, aligned with the title. position: static cancels
the GLOBAL `.close { position: absolute; top: 5px }` rule (boardBody.css) that
otherwise pulls the X out of the header row and drops it below the title. */
position: static;
margin-inline-start: 8px;
font-size: calc(24px * var(--wekan-ui-font-scale, 1));
height: 24px;
line-height: calc(24px * var(--wekan-ui-font-scale, 1));
opacity: 1;
color: #000 !important; /* black X (override themed white link colour) */
}
section#notifications-drawer .header .close i.fa,
section#notifications-drawer .header .notification-menu-toggle i.fa {
color: inherit !important;
}
section#notifications-drawer ul.notifications {
display: block;
padding: 0px 16px 0px 16px;
margin: 0;
height: calc(100vh - 122px);
overflow-y: scroll;
}