Skip to content

Commit

Permalink
feat(core): ✨ use CSS variables for small font sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed Feb 26, 2024
1 parent 3162e19 commit c9f665e
Show file tree
Hide file tree
Showing 48 changed files with 85 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
fieldset {
padding: 0 var( --space-md );
margin: 0;
font-size: 0.875rem;
font-size: var( --font-size-small );
appearance: none;
border: 0;
}
Expand Down Expand Up @@ -127,7 +127,7 @@
width: 100%;
padding: var( --space-sm ) var( --space-md );
font-family: inherit;
font-size: 0.875rem;
font-size: var( --font-size-small );
font-weight: var( --font-weight-medium );
color: #fff;
appearance: none;
Expand Down
4 changes: 2 additions & 2 deletions resources/skins.citizen.search/skins.citizen.search.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
display: flex;
align-items: center;
overflow: hidden;
font-size: 0.875rem;
font-size: var( --font-size-small );
white-space: nowrap;
pointer-events: none;

Expand Down Expand Up @@ -105,7 +105,7 @@
}

&-sm {
font-size: 0.875rem;
font-size: var( --font-size-small );

.citizen-typeahead {
&__content {
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/common/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ td {
align-items: center;
padding-left: 10px;
margin-left: 10px;
font-size: 0.875rem;
font-size: var( --font-size-small );
border-left: 1px solid var( --border-color-base );
}

Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/common/hacks.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ a.feedlink {
* Revisit this when T254055 is resolved
*/
.oo-ui-widget {
font-size: 0.875rem;
font-size: var( --font-size-small );
}

// Replace 50em (50 * 0.875rem) with 50rem
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/components/Drawer.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
justify-content: center;
max-width: 92vw;
padding: var( --space-xs );
font-size: 0.875rem; // TODO: Make this a variable
font-size: var( --font-size-small ); // TODO: Make this a variable

.mw-list-item a {
border-radius: var( --border-radius--small );
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/components/Footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Reserve space for header
margin-bottom: var( --header-size );
clear: both;
font-size: 0.875rem;
font-size: var( --font-size-small );
color: var( --color-base--subtle );
background-color: var( --color-surface-2 );
direction: ltr;
Expand Down
6 changes: 3 additions & 3 deletions resources/skins.citizen.styles/components/Pagetools.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
gap: var( --space-xxs );
margin-left: -0.75rem; // Align to the margin
font-size: 0.875rem;
font-size: var( --font-size-small );
font-weight: var( --font-weight-medium );

// TODO: Merge this with header__item
Expand Down Expand Up @@ -46,7 +46,7 @@
padding: var( --space-xs ) 0;
margin: var( --space-xs );
overflow: auto;
font-size: 0.875rem;
font-size: var( --font-size-small );
.citizen-card;
.citizen-card-hide( top right );
.citizen-card-transition();
Expand Down Expand Up @@ -256,7 +256,7 @@
> .mw-portlet {
li > a {
gap: var( --space-xs );
font-size: 0.875rem;
font-size: var( --font-size-small );
}
}

Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/components/Search.less
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
#searchInput {
flex-grow: 1;
padding: 0;
font-size: 0.875rem;
font-size: var( --font-size-small );
appearance: none;
background: transparent; // Cancel default background
border: 0; // Cancel default border
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.citizen-toc {
font-size: 0.875rem;
font-size: var( --font-size-small );
line-height: var( --line-height-xs );

&__card {
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/components/Usermenu.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.citizen-userMenu {
&__card {
font-size: 0.875rem;
font-size: var( --font-size-small );
.citizen-header-card( right );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}

td {
font-size: 0.875rem;
font-size: var( --font-size-small );
}

th,
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/skinning/elements.less
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ kbd,
samp,
.mw-code {
font-family: var( --font-family-monospace );
font-size: 0.875rem;
font-size: var( --font-size-small );
}

pre,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// Fallback text button if extensions register those
a {
font-size: 0.875rem;
font-size: var( --font-size-small );
border-radius: var( --border-radius--small );

&::before {
Expand Down
2 changes: 1 addition & 1 deletion skinStyles/extensions/AJAXPoll/ext.ajaxpoll.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.ajaxpoll .ajaxpoll-answer-name,
.ajaxpoll-answer-name-revoke {
margin-top: var( --space-xs );
font-size: 0.875rem;
font-size: var( --font-size-small );
}

.ajaxpoll .ajaxpoll-hover-vote {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.mw-advancedSearch-searchPreview-label,
.advancedsearch-namespacesPreview-label {
margin-right: var( --space-xs );
font-size: 0.875rem;
font-size: var( --font-size-small );
font-weight: var( --font-weight-normal );
color: var( --color-base--subtle );
letter-spacing: 0.05em;
Expand All @@ -36,7 +36,7 @@
}

.oo-ui-labelElement > .oo-ui-fieldsetLayout-header > .oo-ui-labelElement-label {
font-size: 0.875rem;
font-size: var( --font-size-small );
font-weight: var( --font-weight-normal );
color: var( --color-base--subtle );
letter-spacing: 0.05em;
Expand Down
2 changes: 1 addition & 1 deletion skinStyles/extensions/Capiunto/capiunto.infobox.main.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
float: none;
margin: 0 auto var( --space-md ) auto;
clear: none;
font-size: 0.875rem;
font-size: var( --font-size-small );
color: var( --color-base );
background-color: var( --color-surface-2 );
border-color: var( --border-color-base );
Expand Down
4 changes: 2 additions & 2 deletions skinStyles/extensions/Cargo/ext.cargo.datatables.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
table.dataTable {
max-width: 100%;
overflow: auto;
font-size: 0.875rem;
font-size: var( --font-size-small );
}

table.dataTable thead th,
Expand Down Expand Up @@ -255,7 +255,7 @@ table.dataTable.no-footer {
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
font-size: 0.875rem;
font-size: var( --font-size-small );
color: var( --color-base );
}

Expand Down
2 changes: 1 addition & 1 deletion skinStyles/extensions/Cargo/ext.cargo.main.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ table.cargoTable.mergeSimilarCells td.even {
}

table.cargoTable {
font-size: 0.875rem;
font-size: var( --font-size-small );
}

table.cargoTable thead tr {
Expand Down
2 changes: 1 addition & 1 deletion skinStyles/extensions/Cargo/ext.cargo.pagevalues.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Apply Citizen sticky header styles
.cargo-pagevalues-tableinfo {
padding: var( --space-md ) 0;
font-size: 0.875rem;
font-size: var( --font-size-small );
color: var( --color-base--subtle );
background-color: transparent;
.citizen-sticky-header;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
max-width: @max-width-breakpoint-tablet;
padding: var( --space-md );
margin: var( --space-xs );
font-size: 0.875rem;
font-size: var( --font-size-small );
line-height: var( --line-height-sm );
background-color: var( --color-surface-1 );
border: 1px solid var( --border-color-base );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
display: block;
width: 1.875rem;
height: 1.875rem;
font-size: 0.875rem;
font-size: var( --font-size-small );
text-indent: -9999px; // Hide text
border-radius: var( --border-radius--small );
opacity: var( --opacity-icon-base );
Expand Down
2 changes: 1 addition & 1 deletion skinStyles/extensions/Echo/ext.echo.special.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
margin: 0;

&-primary {
font-size: 0.875rem;
font-size: var( --font-size-small );
// Align with Citizen label styles
color: var( --color-base--subtle );
letter-spacing: 0.05em;
Expand Down
22 changes: 11 additions & 11 deletions skinStyles/extensions/MediaSearch/mediasearch.styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@

&__meta {
margin-top: var( --space-xxs );
font-size: 0.875rem;
font-size: var( --font-size-small );
}

&:hover &__title {
Expand Down Expand Up @@ -698,15 +698,15 @@
/* AudioResult.less */
.sdms-audio-result {
padding: var( --space-md ) 0;
font-size: 0.875rem;
font-size: var( --font-size-small );
border-bottom: 0;

&__title + &__meta {
margin-top: var( --space-xxs );
}

&__meta {
font-size: 0.875rem;
font-size: var( --font-size-small );
}

p {
Expand All @@ -729,18 +729,18 @@
/* PageResult.less */
.sdms-page-result {
padding: var( --space-md ) 0;
font-size: 0.875rem;
font-size: var( --font-size-small );
border-bottom: 0;

p {
font-size: 0.875rem;
font-size: var( --font-size-small );
color: var( --color-base--subtle );
}

// Sync with duration styles
&__namespace {
padding: var( --space-xxs ) var( --space-xs );
font-size: 0.875rem;
font-size: var( --font-size-small );
font-weight: var( --font-weight-medium );
color: var( --color-base );
background-color: var( --color-surface-2 );
Expand Down Expand Up @@ -805,7 +805,7 @@

/* QuickView.less */
.sdms-quick-view {
font-size: 0.875rem;
font-size: var( --font-size-small );

&__body {
.sd-icon {
Expand Down Expand Up @@ -903,7 +903,7 @@
border-radius: var( --border-radius--small );

@media screen and ( min-width: @min-width-breakpoint-tablet ) {
font-size: 0.875rem;
font-size: var( --font-size-small );
}

&:hover {
Expand Down Expand Up @@ -938,7 +938,7 @@
border-radius: var( --border-radius--small );

@media screen and ( min-width: @min-width-breakpoint-tablet ) {
font-size: 0.875rem;
font-size: var( --font-size-small );
}

&--selected {
Expand Down Expand Up @@ -967,14 +967,14 @@

.sdms-search-results-count {
@media screen and ( min-width: @min-width-breakpoint-tablet ) {
font-size: 0.875rem;
font-size: var( --font-size-small );
}
}

&__clear {
&--no-js {
@media screen and ( min-width: @min-width-breakpoint-tablet ) {
font-size: 0.875rem;
font-size: var( --font-size-small );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions skinStyles/extensions/MsUpload/ext.MsUpload.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
height: 36px;
padding: 0;
margin: 8px;
font-size: 0.875rem;
font-size: var( --font-size-small );
font-weight: var( --font-weight-medium );
color: var( --color-base );
border-color: var( --border-color-base--darker );
Expand Down Expand Up @@ -91,7 +91,7 @@
align-items: center;
padding: 6px 12px;
margin-right: 0;
font-size: 0.875rem;
font-size: var( --font-size-small );

&:hover {
background-color: var( --background-color-quiet--hover );
Expand Down

0 comments on commit c9f665e

Please sign in to comment.