Files
wekan/client/components/settings/settingBody.css
T
Lauri Ojansivu 52acd4b754 Buttons follow the theme: global button base + primary buttons use var(--theme-accent).
WeKan buttons hardcoded their colors, so a Member Settings → Change color theme
override never reached most of them (customTheme.css only themed
`button[type=submit].primary`, not plain `button.primary`, and the global button
base was solid black). Now the global button base and the primary buttons in
client/components/forms/forms.css use `var(--theme-accent, <original>)`, and the
admin action buttons (settingBody.css) and People-panel buttons (peopleBody.css,
incl. ext-box / add-remove-team / unlock-all) do the same. The fallback keeps the
default look identical, but once the user picks a theme accent, the buttons across
the app follow it.

Guarded in tests/buttonThemeColors.test.cjs.

Thanks to xet7 !
2026-07-20 03:11:06 +03:00

334 lines
10 KiB
CSS

.flex,
.setting-content .content-body .side-menu ul li a,
.option {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
}
.setting-content {
color: #727479;
background: #dedede;
width: 100%;
height: 100%;
position: absolute;
}
.setting-content .content-title {
font-size: clamp(16px, 3.5vw, 22px);
}
.setting-content .content-body {
display: flex;
/* Always keep the menu (left) and content (right) side by side, even on
narrow windows. The side menu has a fixed basis and the main body fills
the rest, so both stay visible without switching to a stacked layout. */
flex-direction: row;
flex-wrap: nowrap;
padding-top: 2vh;
height: 100%;
gap: 1.3vw;
}
.setting-content .content-body .side-menu {
background-color: #f7f7f7;
border: 1px solid #f0f0f0;
border-radius: 0.5vw;
width: min(250px, 32vw);
/* Never let the menu be squeezed away on narrow windows; keep it visible. */
flex: 0 0 auto;
box-shadow: inset -0.2vh -0.2vh 0.4vh rgba(0,0,0,0.05);
}
.setting-content .content-body .side-menu ul li {
margin: 0.2vh 0.3vw;
}
.setting-content .content-body .side-menu ul li.active {
background: #fff;
box-shadow: 0 0.2vh 0.3vh rgba(0,0,0,0.15);
}
.setting-content .content-body .side-menu ul li:hover {
background: #fff;
box-shadow: 0 0.2vh 0.3vh rgba(0,0,0,0.15);
}
.setting-content .content-body .side-menu ul li a {
padding: 1.3vh 0 1.3vh 1.3vw;
width: 95%;
}
.setting-content .content-body .side-menu ul li a span {
font-size: 13px;
}
.setting-content .content-body .side-menu ul li a i {
margin-inline-end: 20px;
}
.setting-content .content-body .main-body {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
max-height: 100%;
overflow-x: scroll !important;
overflow-y: scroll !important;
scrollbar-gutter: stable;
/* Grow into the space left next to the side menu. flex-basis MUST be 0 here:
this element holds a min-width:1200px table and a 100vw ::after, so a
content-based (auto) basis is huge and, as an overflow:scroll flex item,
resolves unpredictably (collapsing the panel). Basis 0 + grow makes the
width = container - side menu, deterministically. min-width:0 lets it
shrink so the side menu is never pushed out on narrow windows. */
flex: 1 1 0;
min-width: 0;
}
/* Ensure scrollbars are always visible with proper styling for all admin pages */
.setting-content .content-body .main-body::-webkit-scrollbar {
width: 12px;
height: 12px;
display: block !important;
visibility: visible !important;
}
.setting-content .content-body .main-body::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 6px;
display: block !important;
visibility: visible !important;
}
.setting-content .content-body .main-body::-webkit-scrollbar-thumb {
background: #888;
border-radius: 6px;
display: block !important;
visibility: visible !important;
}
.setting-content .content-body .main-body::-webkit-scrollbar-thumb:hover {
background: #555;
}
.setting-content .content-body .main-body::-webkit-scrollbar-corner {
background: #f1f1f1;
}
/* Ensure tables and content are wide enough to trigger horizontal scrolling */
.setting-content .content-body .main-body table {
min-width: 1200px !important;
width: max-content !important;
table-layout: auto !important;
}
/* Force tables to always trigger horizontal scrolling */
.setting-content .content-body .main-body table td {
white-space: nowrap;
min-width: 120px;
}
/* #6465: headers may wrap — nowrap on long header labels (e.g. the org/team
feature columns) blew the column widths up to the whole label length. */
.setting-content .content-body .main-body table th {
white-space: normal;
min-width: 120px;
max-width: 240px;
}
/* Ensure there's enough content to trigger vertical scrolling */
.setting-content .content-body .main-body {
min-height: calc(100vh - 200px);
padding-bottom: 50px;
}
/* Admin panel buttons should use theme darker color */
.setting-content .content-body .main-body .setting-detail button.btn {
background: var(--theme-accent, #005377);
color: #fff;
border: none;
}
.setting-content .content-body .main-body .setting-detail button.btn:hover,
.setting-content .content-body .main-body .setting-detail button.btn:focus {
background: var(--theme-accent, #004766);
color: #fff;
}
.setting-content .content-body .main-body .setting-detail button.btn:active {
background: var(--theme-accent, #01628c);
color: #fff;
}
/* Force horizontal scrollbar to always be visible at bottom */
.setting-content .content-body .main-body {
position: relative;
}
/* Add invisible content to force horizontal scrolling when needed */
.setting-content .content-body .main-body::after {
content: '';
display: block;
width: 100vw;
height: 1px;
position: absolute;
bottom: 0;
inset-inline-start: 0;
pointer-events: none;
}
.setting-content .content-body .main-body ul li {
padding: 0.5rem 0.5rem;
}
.setting-content .content-body .main-body ul li a .is-checked {
border-bottom: 2px solid #3cb500;
border-inline-end: 2px solid #3cb500;
}
/* Grey checkmarks when grey icons setting is enabled */
body.grey-icons-enabled .setting-content .content-body .main-body ul li a .is-checked {
border-bottom: 2px solid #7a7a7a;
border-inline-end: 2px solid #7a7a7a;
}
.setting-content .content-body .main-body ul li a span {
padding: 0 0.5rem;
}
.setting-content .content-body .main-body ul li .admin-announcement,
.setting-content .content-body .main-body ul li .admin-accessibility,
.setting-content .content-body .main-body ul li .invite-people,
.setting-content .content-body .main-body ul li .layout {
padding-inline-start: 20px;
}
.setting-content .content-body .main-body ul li .admin-announcement li,
.setting-content .content-body .main-body ul li .admin-accessibility li,
.setting-content .content-body .main-body ul li .invite-people li,
.setting-content .content-body .main-body ul li .layout li {
min-width: 500px;
}
.setting-content .content-body .main-body ul li .admin-announcement li ul.no-margin-bottom,
.setting-content .content-body .main-body ul li .admin-accessibility li ul.no-margin-bottom,
.setting-content .content-body .main-body ul li .invite-people li ul.no-margin-bottom,
.setting-content .content-body .main-body ul li .layout li ul.no-margin-bottom {
margin-bottom: 0;
}
.setting-content .content-body .main-body ul li .admin-announcement li .bg-white a,
.setting-content .content-body .main-body ul li .admin-accessibility li .bg-white a,
.setting-content .content-body .main-body ul li .invite-people li .bg-white a,
.setting-content .content-body .main-body ul li .layout li .bg-white a {
background: #f7f7f7;
}
.setting-content .content-body .main-body ul li .admin-announcement li .bg-white a.is-checked,
.setting-content .content-body .main-body ul li .admin-accessibility li .bg-white a.is-checked,
.setting-content .content-body .main-body ul li .invite-people li .bg-white a.is-checked,
.setting-content .content-body .main-body ul li .layout li .bg-white a.is-checked {
background: #fff;
}
.setting-content .content-body .main-body ul li input[type=radio] {
margin: 4px;
}
.option {
-webkit-border-radius: 3px;
border-radius: 3px;
background: #fff;
text-decoration: none;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2);
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
margin-top: 5px;
padding: 5px;
}
.title {
font-weight: 700;
margin-bottom: 0.5rem;
}
.description {
margin-bottom: 0.5rem;
}
.bg-white {
background: #f9fbfc;
}
.wekan-form-control.has-error {
border-color: #a94442;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}
li.has-error {
color: #a94442;
}
li.has-error .form-group .wekan-form-control {
border-color: #a94442;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}
/* Constrain textarea elements with balanced left/right spacing */
.setting-content .content-body .main-body textarea.wekan-form-control {
width: calc(100% - 20px);
margin: 0 10px;
max-width: calc(100vw - 320px);
box-sizing: border-box;
}
/* For nested custom head/manifest/assetlinks sections */
.setting-content .content-body .main-body .custom-head-settings textarea.wekan-form-control,
.setting-content .content-body .main-body .custom-manifest-settings textarea.wekan-form-control,
.setting-content .content-body .main-body .custom-assetlinks-settings textarea.wekan-form-control {
width: calc(100% - 20px);
margin-inline-start: 0;
margin-inline-end: 10px;
max-width: calc(100vw - 240px);
box-sizing: border-box;
}
.setting-content .content-body .main-body .attachment-limit-row {
display: flex;
align-items: center;
gap: 10px;
max-width: 560px;
}
.setting-content .content-body .main-body .attachment-limit-row input.wekan-form-control {
flex: 1;
min-width: 200px;
}
.setting-content .content-body .main-body .attachment-limit-row select.wekan-form-control {
width: 120px;
min-width: 120px;
}
/* #6419: on phones the admin settings forced a side-by-side menu+content layout
(flex-direction: row "even on narrow windows"), so the ~127px side menu and the
content were crammed together and the long (e.g. Finnish) menu labels overflowed
the menu box rightward, visually overlapping the content. Stack them on small
screens: a full-width compact menu on top, full-width content below. */
@media screen and (max-width: 800px) {
.setting-content {
position: relative;
height: auto;
min-height: 100%;
}
.setting-content .content-body {
flex-direction: column;
flex-wrap: nowrap;
gap: 8px;
height: auto;
padding-top: 1vh;
}
.setting-content .content-body .side-menu {
width: 100%;
flex: 0 0 auto;
border-radius: 6px;
}
/* Menu items as a wrapping horizontal row so the menu stays compact on top. */
.setting-content .content-body .side-menu ul {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 4px;
}
.setting-content .content-body .side-menu ul li {
flex: 0 0 auto;
margin: 0;
}
.setting-content .content-body .side-menu ul li a {
width: auto;
white-space: nowrap;
padding: 10px 12px;
}
.setting-content .content-body .main-body {
width: 100%;
flex: 1 1 auto;
min-height: 60vh;
overflow-x: auto !important;
}
}