[ticket/17459] Extend usage of css variables

PHPBB-17459
This commit is contained in:
Marc Alexander 2024-11-04 17:36:29 +01:00
parent d32970348f
commit 79fc90dce3
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
4 changed files with 50 additions and 51 deletions

View file

@ -24,12 +24,12 @@
} }
.panel-container .panel p { .panel-container .panel p {
font-size: 14px; font-size: var(--ps-font-small);
} }
.panel-container .panel ol { .panel-container .panel ol {
font-size: 14px; font-size: var(--ps-font-small);
margin-left: 28px; margin-left: calc(var(--ps-font-small) * 2);
} }
.panel-container .panel li.row { .panel-container .panel li.row {
@ -80,7 +80,7 @@ ul.cplist {
} }
.panel-container .postbody p.author { .panel-container .postbody p.author {
font-size: 14px; font-size: var(--ps-font-small);
} }
.cp-main .buttons { .cp-main .buttons {
@ -118,9 +118,9 @@ ul.cplist {
.tabs .tab, .tabs .tab,
.minitabs .tab { .minitabs .tab {
font-size: 12px; font-size: var(--ps-font-tiny);
font-weight: bold; font-weight: bold;
line-height: 18px; line-height: 1.4;
display: block; display: block;
float: left; float: left;
} }
@ -180,12 +180,12 @@ ul.cplist {
} }
.responsive-tab > a.responsive-tab-link { .responsive-tab > a.responsive-tab-link {
font-size: 20px; font-size: var(--ps-font-h3);
line-height: 18px; line-height: 0.875;
text-decoration: none; text-decoration: none;
position: relative; position: relative;
display: block; display: block;
width: 20px; width: var(--ps-font-h3);
} }
.responsive-tab .responsive-tab-link:before { .responsive-tab .responsive-tab-link:before {
@ -201,7 +201,7 @@ ul.cplist {
.tabs .dropdown, .tabs .dropdown,
.minitabs .dropdown { .minitabs .dropdown {
font-size: 14px; font-size: var(--ps-font-small);
font-weight: normal; font-weight: normal;
top: 20px; top: 20px;
margin-right: -2px; margin-right: -2px;
@ -248,14 +248,13 @@ ul.cplist {
/* Link styles for the sub-section links */ /* Link styles for the sub-section links */
.navigation a { .navigation a {
font-size: 12px; font-size: var(--ps-font-tiny);
text-decoration: none; text-decoration: none;
border: 1px solid transparent;
border-radius: 4px 0 0 4px;
display: block; display: block;
margin: 1px 0; margin: 1px 0;
padding: 5px; padding: 5px;
border: 1px solid transparent;
border-radius: 4px 0 0 4px;
} }
.navigation a:hover { .navigation a:hover {
@ -272,12 +271,12 @@ ul.cplist {
/* Friends list */ /* Friends list */
.cp-mini { .cp-mini {
font-size: 12px; font-size: var(--ps-font-tiny);
border-radius: 7px; border-radius: 7px;
overflow-y: auto; overflow-y: auto;
max-height: 200px; max-height: 200px;
margin: 12px 15px 12px 5px; margin: var(--ps-font-tiny) 15px var(--ps-font-tiny) 5px;
padding: 5px 12px; padding: 5px var(--ps-font-tiny);
} }
dl.mini dt { dl.mini dt {

View file

@ -9,13 +9,13 @@
---------------------------------------- */ ---------------------------------------- */
fieldset { fieldset {
font-family: Verdana, Helvetica, Arial, sans-serif; font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 14px; font-size: var(--ps-font-small);
border-width: 0; border-width: 0;
} }
input { input {
font-family: Verdana, Helvetica, Arial, sans-serif; font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 14px; font-size: var(--ps-font-small);
font-weight: normal; font-weight: normal;
vertical-align: middle; vertical-align: middle;
padding: 0 3px; padding: 0 3px;
@ -23,7 +23,7 @@ input {
select { select {
font-family: Verdana, Helvetica, Arial, sans-serif; font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 14px; font-size: var(--ps-font-small);
font-weight: normal; font-weight: normal;
vertical-align: middle; vertical-align: middle;
border: 1px solid transparent; border: 1px solid transparent;
@ -36,18 +36,18 @@ select:focus {
} }
option { option {
padding-right: 14px; padding-right: var(--ps-font-small);
} }
select optgroup option { select optgroup option {
font-family: Verdana, Helvetica, Arial, sans-serif; font-family: Verdana, Helvetica, Arial, sans-serif;
padding-right: 14px; padding-right: var(--ps-font-small);
} }
textarea { textarea {
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 14px; font-size: var(--ps-font-small);
line-height: 20px; line-height: 1.5;
width: 60%; width: 60%;
padding: 2px; padding: 2px;
} }
@ -184,7 +184,7 @@ fieldset.display-options a {
} }
.dropdown fieldset.display-options { .dropdown fieldset.display-options {
font-size: 14px; font-size: var(--ps-font-small);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
@ -203,10 +203,10 @@ fieldset.display-options a {
/* Display actions for ucp and mcp pages */ /* Display actions for ucp and mcp pages */
fieldset.display-actions { fieldset.display-actions {
line-height: 28px; line-height: 2;
text-align: right; text-align: right;
white-space: nowrap; white-space: nowrap;
padding-right: 14px; padding-right: var(--ps-font-small);
} }
fieldset.display-actions label { fieldset.display-actions label {
@ -216,7 +216,7 @@ fieldset.display-actions label {
/* Not used anywhere */ /* Not used anywhere */
fieldset.sort-options { fieldset.sort-options {
line-height: 28px; line-height: 2;
} }
/* MCP forum selection */ /* MCP forum selection */
@ -262,7 +262,7 @@ fieldset.submit-buttons input {
.message-box textarea { .message-box textarea {
font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
font-size: 16px; font-size: var(--ps-font-normal);
outline: 3px dashed transparent; outline: 3px dashed transparent;
outline-offset: -4px; outline-offset: -4px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
@ -369,7 +369,7 @@ input.disabled {
float: left; float: left;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
height: 30px; height: calc(var(--ps-line-height) * 1.25);
padding: 3px; padding: 3px;
} }

View file

@ -12,14 +12,14 @@ svg {
.o-icon { .o-icon {
vertical-align: middle !important; vertical-align: middle !important;
width: 18px; width: var(--ps-font-h4);
height: 18px; height: var(--ps-font-h4);
} }
.o-icon-src-mdi, .o-icon-src-mdi,
.o-icon-src-ic { .o-icon-src-ic {
width: 22px; width: calc(var(--ps-font-h4) + 4px); /* icon + 2 * 2px padding */
height: 22px; height: calc(var(--ps-font-h4) + 4px); /* icon + 2 * 2px padding */
} }
.o-icon-src-fa { .o-icon-src-fa {
@ -28,7 +28,7 @@ svg {
.o-icon-font { .o-icon-font {
font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands"; font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
font-size: 18px; font-size: var(--ps-font-h4);
font-style: normal; font-style: normal;
font-variant: normal; font-variant: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@ -57,7 +57,7 @@ span + .o-icon {
blockquote cite:before, blockquote cite:before,
.uncited:before { .uncited:before {
font-size: 40px; font-size: calc(var(--ps-font-normal) * 2.5);
vertical-align: bottom; vertical-align: bottom;
display: inline-block; display: inline-block;
margin-top: 8px; margin-top: 8px;
@ -72,9 +72,9 @@ blockquote cite:before,
.c-forum-row-icon, .c-forum-row-icon,
.c-notification-check-icon { .c-notification-check-icon {
font-size: 24px; font-size: var(--ps-font-h1);
width: 24px; width: var(--ps-font-h1);
height: 24px; height: var(--ps-font-h1);
margin-top: 0; margin-top: 0;
} }
@ -86,8 +86,8 @@ blockquote cite:before,
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 36px; width: calc(var(--ps-font-normal) * 2.25);
height: 36px; height: calc(var(--ps-font-normal) * 2.25);
margin-top: -17px; margin-top: -17px;
margin-left: 9px; margin-left: 9px;
} }

View file

@ -69,7 +69,7 @@ a.forumtitle,
a.topictitle, a.topictitle,
span.topictitle { span.topictitle {
font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
font-size: 16px; font-size: var(--ps-font-normal);
text-decoration: none; text-decoration: none;
} }
@ -151,24 +151,24 @@ a.lastsubject:hover {
} }
.top { .top {
font-size: 14px; font-size: var(--ps-font-small);
text-decoration: none; text-decoration: none;
margin-top: 12px; margin-top: calc(var(--ps-font-small) - 2px);
} }
.to-top-button { .to-top-button {
position: fixed;
right: 24px;
bottom: 24px;
inline-size: 48px;
block-size: 48px;
border-radius: 50%; border-radius: 50%;
position: fixed;
right: var(--ps-line-height);
bottom: var(--ps-line-height);
display: none; display: none;
block-size: calc(var(--ps-line-height) * 2);
inline-size: calc(var(--ps-line-height) * 2);
} }
.to-top-button .o-icon { .to-top-button .o-icon {
font-size: 32px; font-size: calc(var(--ps-font-normal) * 2);
padding: 8px; padding: calc(var(--ps-font-normal) / 2);
} }
/* Back to top of page */ /* Back to top of page */