Skip to content

Commit

Permalink
Reactoring theme font-family defintions (#5983)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvg authored Feb 1, 2024
2 parents e01cfc1 + 77a781f commit 4368d80
Show file tree
Hide file tree
Showing 66 changed files with 1,155 additions and 746 deletions.
3 changes: 0 additions & 3 deletions packages/components/src/components/link/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

Die **Link**-Komponente rendert einen auf Barrierefreiheit optimierten Link, der als Text, als Icon oder auch in Kombination ausgegeben werden kann.

Beachten Sie, dass die Komponente automatisch ein Padding links und rechts zum umgebenden Text erzeugt. Sie kann daher im Fließtext ohne
Eingabe von Leerzeichen eingefügt werden. Zusätzliche Leerzeichen vergrößern den Abstand zum umgebenden Text.

## Konstruktion

### Code
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const App: FC = () => {
)}

<div className="p-4" id="route-container">
{!hideMenus && isDraftTheme(theme) && <KolBadge className="mb-3" _label="DRAFT" _color="#db5461" />}
{!hideMenus && isDraftTheme(theme) && <KolBadge className="block mb-3" _label="DRAFT" _color="#db5461" />}
<Routes>
{ROUTE_TREE}
<Route path="*" element={<KolAlert _type="info">This code example has not been migrated yet - it&#39;s coming soon!</KolAlert>} />
Expand Down
4 changes: 2 additions & 2 deletions packages/samples/react/src/components/link/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export const LinkBasic: FC = () => (
Eigenschaften zuweisen.
<br />
<br />
Danach folgt ein Link, der als block-Element ausgegeben wird.
<KolLink class="d-block" _href="#" _label="Simple Link" />, daher gehe ich über die ganze Breite des Eltern-Elements erzeuge so einen Zeilenumbruch.
Danach folgt ein Link, der als block-Element ausgegeben wird. <KolLink class="d-block" _href="#" _label="Simple Link" />, daher gehe ich über die ganze
Breite des Eltern-Elements erzeuge so einen Zeilenumbruch.
</p>
</div>
);
2 changes: 2 additions & 0 deletions packages/schema/src/tag-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ export enum TagEnum {
'input-radio',
'input-range',
'input-text',
'kolibri',
'link',
'link-button',
'link-group',
'logo',
'modal',
'nav',
'pagination',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 88 additions & 4 deletions packages/themes/bmf/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ export const BMF = KoliBri.createTheme('bmf', {
--spacing: 0.25em;
}
:host {
font-family: var(--font-family); /* font-size: var(--font-size); */
background-color: transparent; /* Reset global background-color defined by components */
}
* {
box-sizing: border-box;
}
*:not(i) {
font-family: var(--font-family);
}
h1,
h2,
h3,
Expand Down Expand Up @@ -108,6 +104,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-BUTTON': css`
:host {
font-family: var(--font-family);
}
:is(a, button) {
font-size: 1.125em;
}
Expand Down Expand Up @@ -237,6 +236,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-TEXT': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -316,6 +318,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-PASSWORD': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -396,6 +401,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-NUMBER': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -476,6 +484,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-DATE': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -556,6 +567,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-EMAIL': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -636,6 +650,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-FILE': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -722,6 +739,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-TEXTAREA': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
display: grid;
Expand Down Expand Up @@ -825,6 +845,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-ALERT': css`
:host {
font-family: var(--font-family);
}
.msg,
.msg {
border-width: 0;
Expand Down Expand Up @@ -1103,6 +1126,11 @@ export const BMF = KoliBri.createTheme('bmf', {
outline: none;
}
`,
'KOL-AVATAR': css`
:host {
font-family: var(--font-family);
}
`,
'KOL-HEADING': css`
.headline-h1,
.headline-h2,
Expand Down Expand Up @@ -1136,6 +1164,7 @@ export const BMF = KoliBri.createTheme('bmf', {
'KOL-BADGE': css`
:host {
display: inline-block;
font-family: var(--font-family);
}
:host > span {
border-radius: 0.3125rem;
Expand Down Expand Up @@ -1177,6 +1206,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INDENTED-TEXT': css`
:host {
font-family: var(--font-family);
}
:host > div {
background-color: var(--color-white);
border-left: none;
Expand Down Expand Up @@ -1225,6 +1257,7 @@ export const BMF = KoliBri.createTheme('bmf', {
'KOL-DETAILS': css`
details > summary {
border-radius: var(--border-radius);
font-family: var(--font-family);
}
details kol-indented-text {
margin: 0.25em 0px 0px 0.65em;
Expand All @@ -1247,6 +1280,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-PROGRESS': css`
:host {
font-family: var(--font-family);
}
.bar > div {
flex-direction: column;
gap: 0.5rem !important;
Expand Down Expand Up @@ -1300,6 +1336,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-SELECT': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -1402,6 +1441,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-COLOR': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -1490,6 +1532,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-ACCORDION': css`
:host {
font-family: var(--font-family);
}
kol-span-wc > span {
display: flex;
place-items: baseline center;
Expand Down Expand Up @@ -1548,6 +1593,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-TABLE': css`
:host {
font-family: var(--font-family);
}
:host * {
hyphens: var(--kolibri-hyphens);
font-family: var(--kolibri-font-family);
Expand Down Expand Up @@ -1694,6 +1742,10 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-CARD': css`
:host {
font-family: var(--font-family);
}
/* https://www.figma.com/file/56JbmrssCRpjpfxoAFeHqT/Design-System-EPLF-(in-progress)?node-id=8225%3A5945 */
:host > div {
display: grid;
Expand Down Expand Up @@ -1722,6 +1774,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-CHECKBOX': css`
:host {
font-family: var(--font-family);
}
/* INPUT */
:host kol-input {
display: grid;
Expand Down Expand Up @@ -1956,6 +2011,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-RADIO': css`
:host {
font-family: var(--font-family);
}
/* INPUT */
kol-input {
display: grid;
Expand Down Expand Up @@ -2101,6 +2159,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-TABS': css`
:host {
font-family: var(--font-family);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
Expand Down Expand Up @@ -2252,6 +2313,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-PAGINATION': css`
:host {
font-family: var(--font-family);
}
.icon::part(icon) {
font-family: 'Font Awesome 6 Free';
font-weight: 900;
Expand Down Expand Up @@ -2310,6 +2374,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-INPUT-RANGE': css`
:host {
font-family: var(--font-family);
}
kol-input {
gap: 0.25em;
}
Expand Down Expand Up @@ -2385,7 +2452,15 @@ export const BMF = KoliBri.createTheme('bmf', {
color: var(--color-black);
}
`,
'KOL-KOLIBRI': css`
:host {
font-family: var(--font-family);
}
`,
'KOL-LINK-BUTTON': css`
:host {
font-family: var(--font-family);
}
:is(a, button) {
font-size: 1.125em;
}
Expand Down Expand Up @@ -2558,6 +2633,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-BREADCRUMB': css`
:host {
font-family: var(--font-family);
}
li:has(:is(kol-icon + kol-link, kol-icon + span)) kol-icon {
font-size: 0.75rem;
}
Expand All @@ -2579,6 +2657,9 @@ export const BMF = KoliBri.createTheme('bmf', {
ul li:last-child > span {
color: var(--color-grey);
}
kol-link {
font-family: var(--font-family);
}
`,
'KOL-MODAL': css`
:host .overlay .modal {
Expand Down Expand Up @@ -9590,6 +9671,9 @@ export const BMF = KoliBri.createTheme('bmf', {
}
`,
'KOL-SPLIT-BUTTON': css`
:host {
font-family: var(--font-family);
}
.popover {
background: #fff;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/themes/default/src/components/accordion.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@import '../mixins/focus-outline';

@layer kol-theme-component {
:host {
font-family: var(--font-family);
}
kol-span-wc > span {
display: flex;
place-items: baseline center;
Expand All @@ -22,6 +25,7 @@
}
:host > div > kol-heading-wc button kol-icon {
color: var(--color-primary);
font-size: 1rem;
}
:host > div {
width: 100%;
Expand Down
3 changes: 3 additions & 0 deletions packages/themes/default/src/components/alert.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@layer kol-theme-component {
:host {
font-family: var(--font-family);
}
.msg {
border-width: 0;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/themes/default/src/components/avatar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@layer kol-theme-component {
:host {
font-family: var(--font-family);
}
}
1 change: 1 addition & 0 deletions packages/themes/default/src/components/badge.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@layer kol-theme-component {
:host {
display: inline-block;
font-family: var(--font-family);
font-size: inherit;
}
:host > span {
Expand Down
6 changes: 6 additions & 0 deletions packages/themes/default/src/components/breadcrumb.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@layer kol-theme-component {
:host {
font-family: var(--font-family);
}
li:has(:is(kol-icon + kol-link, kol-icon + span)) kol-icon {
font-size: 0.75rem;
color: var(--color-subtle);
Expand All @@ -13,4 +16,7 @@
ul li:last-child > span {
color: var(--color-subtle);
}
kol-link {
font-family: var(--font-family);
}
}
Loading

0 comments on commit 4368d80

Please sign in to comment.