Skip to content

Commit

Permalink
Fix font in landing and app
Browse files Browse the repository at this point in the history
  • Loading branch information
iLynxcat committed Dec 18, 2024
1 parent ca295c4 commit 2a93bcb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@sd/interface';
import { RouteTitleContext } from '@sd/interface/hooks/useRouteTitle';

import '@sd/ui/style/style.scss';
import '@sd/ui/style';

import SuperTokens from 'supertokens-web-js';
import EmailPassword from 'supertokens-web-js/recipe/emailpassword';
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Preview } from '@storybook/react';

import '@sd/ui/style/style.scss';
import '@sd/ui/style';

const preview: Preview = {
parameters: {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "GPL-3.0-only",
"main": "src/index.ts",
"types": "src/index.ts",
"sideEffects": false,
"sideEffects": ["./style/index.js", "./style/style.scss"],
"exports": {
".": "./src/index.ts",
"./src/forms": "./src/forms/index.ts",
Expand Down
13 changes: 9 additions & 4 deletions packages/ui/style/tailwind.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ function alpha(variableName) {
}

module.exports = function (app, options) {
/**
* @type {import('tailwindcss').Config}
*/
let config = {
content: [
`../../apps/${app}/src/**/*.{ts,tsx,html,stories.tsx}`,
Expand Down Expand Up @@ -41,10 +44,6 @@ module.exports = function (app, options) {
'7xl': '5rem'
},
extend: {
fontFamily: {
plex: ['var(--font-plex-sans)', ...defaultTheme.fontFamily.sans],
sans: ['var(--font-inter)', ...defaultTheme.fontFamily.sans]
},
colors: {
accent: {
DEFAULT: alpha('--color-accent'),
Expand Down Expand Up @@ -178,6 +177,12 @@ module.exports = function (app, options) {
]
};

if (app === 'landing') {
console.log('CONFIGURING TAILWIND for Landing');
config.theme.fontFamily.sans = ['var(--font-inter)', ...defaultTheme.fontFamily.sans];
config.theme.fontFamily.plex = ['var(--font-plex-sans)', ...defaultTheme.fontFamily.sans];
}

return config;
};

Expand Down

0 comments on commit 2a93bcb

Please sign in to comment.