[Refactor] Inherit font family body on most standard components (#1994)

This commit is contained in:
Carlos Fernandez 2026-06-13 05:43:59 -04:00 committed by GitHub
parent 9f26c53af5
commit a486ed75a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 40 deletions

View file

@ -1,25 +1,21 @@
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cinzel+Decorative:wght@700&family=Montserrat:wght@400;600&display=swap');
@import './mixin.less';
:root {
--dh-font-title: 'Cinzel Decorative';
--dh-font-subtitle: 'Cinzel';
--dh-font-body: 'Montserrat';
/* Include missing font sizes */
--font-size-8: 0.5rem;
--font-size-9: 0.5625rem;
--font-size-22: 1.375rem;
}
@font-title: ~"var(--dh-font-title, 'Cinzel Decorative'), serif";
@font-subtitle: ~"var(--dh-font-subtitle, 'Cinzel'), serif";
@font-body: ~"var(--dh-font-body, 'Montserrat'), sans-serif";
.dh-style {
.dh-typography();
}
.dh-style fieldset {
.dh-typography();
}
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cinzel+Decorative:wght@700&family=Montserrat:wght@400;600&display=swap');
@import './mixin.less';
:root {
--dh-font-title: 'Cinzel Decorative';
--dh-font-subtitle: 'Cinzel';
--dh-font-body: 'Montserrat';
/* Include missing font sizes */
--font-size-8: 0.5rem;
--font-size-9: 0.5625rem;
--font-size-22: 1.375rem;
}
@font-title: ~"var(--dh-font-title, 'Cinzel Decorative'), serif";
@font-subtitle: ~"var(--dh-font-subtitle, 'Cinzel'), serif";
@font-body: ~"var(--dh-font-body, 'Montserrat'), sans-serif";
.dh-style {
.dh-typography();
}

View file

@ -49,16 +49,15 @@
* Apply default typography styles.
*/
.dh-typography() {
--font-body: @font-body;
font-family: @font-body;
h1 {
--dh-input-color-text: @color-text-emphatic;
font-family: @font-title;
margin: 0;
border: none;
font-weight: normal;
input[type='text'],
.input[contenteditable] {
font-family: @font-title;
}
}
h2,
@ -86,22 +85,17 @@
font-weight: normal;
}
p,
span,
textarea,
label,
select,
// todo: determine if we can remove these or replace with font-family: inherit
multi-select .tags .tag,
table,
fieldset legend,
input[type='text'],
input[type='number'],
input[type='search'],
.tagify__dropdown,
li {
.tagify__dropdown {
font-family: @font-body;
}
textarea {
font-family: inherit;
}
button span {
font-weight: bold;
}