Files
wekan/client/components/rules/rules.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

412 lines
10 KiB
CSS

/* Rules is now a fullscreen board-scoped page (below the single top bar),
* no longer a wide modal. .rules-page centers the content and gives it room. */
.rules-page {
max-width: 1100px;
margin: 0 auto;
padding: 9px 14px 36px;
}
.rules-page h2 {
margin-bottom: 9px;
}
.rules-toolbar {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 9px;
}
.rules-toolbar button {
cursor: pointer;
}
.rules-list {
overflow: hidden;
overflow-y: auto;
max-height: 65vh;
padding-inline-end: 10px;
}
.rules-lists-item .js-rule-select {
float: inline-start;
margin: 6px 8px 0 0;
}
.rules-lists-item .js-edit-rule-input {
width: 60%;
}
/* Visual workflow view */
.rules-workflow .workflow-group {
margin-bottom: 18px;
}
.rules-workflow .workflow-group-title {
border-bottom: 2px solid #cfcfcf;
padding-bottom: 4px;
margin-bottom: 9px;
}
.rules-workflow .workflow-rule {
display: flex;
align-items: stretch;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 8px;
}
.rules-workflow .workflow-node {
flex: 1 1 200px;
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 6px;
padding: 8px 10px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.rules-workflow .workflow-node-when {
border-inline-start: 4px solid #1565c0;
}
.rules-workflow .workflow-node-then {
border-inline-start: 4px solid #2e7d32;
}
.rules-workflow .workflow-node-label {
display: block;
font-size: calc(11px * var(--wekan-ui-font-scale, 1));
text-transform: uppercase;
color: #888;
}
.rules-workflow .workflow-node-text {
font-size: calc(14px * var(--wekan-ui-font-scale, 1));
}
.rules-workflow .workflow-arrow {
display: flex;
align-items: center;
font-size: calc(20px * var(--wekan-ui-font-scale, 1));
color: #888;
}
/* Drag-and-drop workflow editor */
.rules-workflow .workflow-help {
color: #727479;
font-size: calc(13px * var(--wekan-ui-font-scale, 1));
margin-bottom: 9px;
}
.rules-workflow .workflow-builder {
background: #f7f7f7;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 12px;
margin-bottom: 14px;
}
.rules-workflow .workflow-builder-row {
display: flex;
align-items: stretch;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 10px;
}
.rules-workflow .workflow-slot {
flex: 1 1 220px;
min-height: 52px;
border: 2px dashed #b0b0b0;
border-radius: 6px;
display: flex;
align-items: center;
padding: 6px 10px;
background: #fff;
}
.rules-workflow .workflow-slot-placeholder {
color: #999;
font-style: italic;
}
.rules-workflow .workflow-slot-clear {
margin-inline-start: auto;
color: #b00;
cursor: pointer;
padding-inline-start: 8px;
}
.rules-workflow .workflow-builder-controls {
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
}
.rules-workflow .workflow-builder-controls input {
flex: 1 1 240px;
}
.rules-workflow .workflow-palettes {
display: flex;
gap: 16px;
flex-wrap: wrap;
margin-bottom: 14px;
}
.rules-workflow .workflow-palette {
flex: 1 1 240px;
}
.rules-workflow .workflow-chip {
display: inline-flex;
align-items: center;
gap: 6px;
background: #fff;
border: 1px solid #cfcfcf;
border-radius: 16px;
padding: 6px 12px;
margin: 0 6px 6px 0;
cursor: grab;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.rules-workflow .workflow-chip:active {
cursor: grabbing;
}
.rules-workflow .js-trigger-chip {
border-inline-start: 4px solid #1565c0;
}
.rules-workflow .js-action-chip {
border-inline-start: 4px solid #2e7d32;
}
.rules-workflow .workflow-existing-title {
margin-top: 9px;
}
.rules-workflow .workflow-rule {
position: relative;
}
.rules-workflow .workflow-rule-delete {
display: flex;
align-items: center;
color: #b00;
padding-inline-start: 8px;
}
.rules-lists-item {
display: block;
position: relative;
overflow: auto;
border-bottom: 1px solid #bfbfbf;
}
.rules-lists-item p {
display: inline-block;
float: inline-start;
margin: revert;
}
.hide-element {
display: none !important;
}
.user-details {
display: inline-block;
}
.rules-btns-group {
position: absolute;
inset-inline-end: 0;
top: 50%;
transform: translateY(-50%);
}
.rules-btns-group button {
margin: auto;
}
.rules-add {
display: block;
overflow: auto;
margin-top: 18px;
margin-bottom: 6px;
}
.rules-add input {
display: inline-block;
float: inline-end;
margin: auto;
margin-inline-end: 18px;
}
.rules-add button {
display: inline-block;
float: inline-end;
margin: auto;
}
.rules-back {
display: block;
overflow: auto;
margin-top: 15px;
margin-bottom: 5px;
}
.rules-back button {
display: inline-block;
float: inline-end;
margin: auto;
margin-inline-end: 14px;
}
.rules-back .js-goback .fa-arrow-left {
color: #fff !important;
}
.flex,
.triggers-content .triggers-body .triggers-side-menu ul li a {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
}
.triggers-content {
color: #727479;
background: #dedede;
}
.triggers-content .triggers-body {
display: flex;
padding-top: 15px;
height: 100%;
}
.triggers-content .triggers-body .triggers-side-menu {
background-color: #f7f7f7;
border: 1px solid #f0f0f0;
border-radius: 4px;
height: intrinsic;
box-shadow: inset -1px -1px 3px rgba(0,0,0,0.05);
}
.triggers-content .triggers-body .triggers-side-menu ul li {
margin: 0.1rem 0.2rem;
width: 50px;
height: 50px;
text-align: center;
font-size: calc(25px * var(--wekan-ui-font-scale, 1));
position: relative;
}
.triggers-content .triggers-body .triggers-side-menu ul li i {
position: absolute;
top: 50%;
left: 50%;
box-shadow: none;
transform: translate(-50%, -50%);
}
.triggers-content .triggers-body .triggers-side-menu ul li.active {
background: #fff;
box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.triggers-content .triggers-body .triggers-side-menu ul li:hover {
background: #fff;
box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.triggers-content .triggers-body .triggers-side-menu ul li a {
padding: 1rem 0 1rem 1rem;
width: 95%;
}
.triggers-content .triggers-body .triggers-side-menu ul li a span {
font-size: calc(13px * var(--wekan-ui-font-scale, 1));
}
.triggers-content .triggers-body .triggers-main-body {
padding: 0.1em 1em;
width: 100%;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item {
overflow: auto;
padding: 10px;
height: 100px;
margin-bottom: 5px;
border-radius: 3px;
position: relative;
background-color: #fff;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content {
position: absolute;
top: 50%;
transform: translateY(-50%);
inset-inline-start: 10px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-text {
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
display: inline-block;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-inline-button {
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
display: inline;
padding: 6px;
border: 1px solid #eee;
border-radius: 4px;
box-shadow: inset -1px -1px 3px rgba(0,0,0,0.05);
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-inline-button:hover,
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-inline-button.is-active {
box-shadow: 0 0 0 2px #666 inset;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-text.trigger-text-email {
margin-inline-start: 5px;
margin-top: 10px;
margin-bottom: 10px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-dropdown {
display: inline-block;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-dropdown select {
width: auto;
height: 30px;
margin: 0px;
margin-inline-start: 5px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content .trigger-dropdown input {
display: inline-block;
width: 80px;
margin: 0;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-content-mail {
inset-inline-start: 20px;
inset-inline-end: 100px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 30px;
height: 30px;
border: 1px solid #eee;
border-radius: 4px;
box-shadow: inset -1px -1px 3px rgba(0,0,0,0.05);
text-align: center;
font-size: calc(20px * var(--wekan-ui-font-scale, 1));
inset-inline-end: 10px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button i {
position: absolute;
top: 50%;
left: 50%;
box-shadow: none;
transform: translate(-50%, -50%);
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button:hover,
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button.is-active {
box-shadow: 0 0 0 2px #666 inset;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button.trigger-button-email {
top: 30px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button.trigger-button-person {
inset-inline-end: -40px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item .trigger-button.trigger-button-color {
top: unset;
position: unset;
transform: unset;
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
width: auto;
padding-inline-start: 10px;
padding-inline-end: 10px;
height: 40px;
}
.triggers-content .triggers-body .triggers-main-body .trigger-item.trigger-item-mail {
height: 300px;
}
/* Rules import/export popup */
.rules-import-export h3 {
margin: 0.6em 0 0.3em;
font-size: calc(15px * var(--wekan-ui-font-scale, 1));
}
.rules-import-export .rules-ie-hint {
font-size: calc(12px * var(--wekan-ui-font-scale, 1));
color: #727479;
margin-bottom: 0.3em;
}
.rules-import-export .rules-ie-textarea {
width: 100%;
box-sizing: border-box;
}
.rules-import-export .rules-ie-btns {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.rules-import-export .rules-ie-btns button {
flex: 1 1 auto;
}
.rules-import-export .rules-ie-message {
margin-top: 0.6em;
padding: 6px 8px;
background: #e8f0fe;
border-radius: 4px;
font-size: calc(13px * var(--wekan-ui-font-scale, 1));
}