mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Updated font handling for admin-x settings
refs https://github.com/TryGhost/Team/issues/3151 - splits font loading between css files that are loaded locally for storybook/demo app vs the exported App - uses local Inter font for exported App vs local asset for demo
This commit is contained in:
parent
bfd6581696
commit
6630fd1cb4
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import '../src/styles/index.css';
|
||||
import '../src/styles/demo.css';
|
||||
import type { Preview } from "@storybook/react";
|
||||
|
||||
const preview: Preview = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import './styles/index.css';
|
||||
import './styles/demo.css';
|
||||
import App from './App.tsx';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
|
63
ghost/admin-x-settings/src/styles/demo.css
Normal file
63
ghost/admin-x-settings/src/styles/demo.css
Normal file
@ -0,0 +1,63 @@
|
||||
@import './preflight.css';
|
||||
|
||||
@import 'tailwindcss/base';
|
||||
@import 'tailwindcss/components';
|
||||
@import 'tailwindcss/utilities';
|
||||
|
||||
/* Defaults */
|
||||
@layer base {
|
||||
@font-face {
|
||||
font-family: "Inter";
|
||||
src: url("./src/assets/fonts/Inter.ttf") format("truetype-variations");
|
||||
font-weight: 100 900;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply font-sans text-black text-base leading-normal;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
@apply font-bold tracking-tight leading-tighter;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@apply text-4xl leading-supertight;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply text-3xl;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@apply text-2xl;
|
||||
}
|
||||
|
||||
h4 {
|
||||
@apply text-xl;
|
||||
}
|
||||
|
||||
h5 {
|
||||
@apply text-lg leading-tight;
|
||||
}
|
||||
|
||||
h6 {
|
||||
@apply text-md leading-normal;
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
font-size: 62.5%;
|
||||
line-height: 1.5;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
html, body, #root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
@layer base {
|
||||
@font-face {
|
||||
font-family: "Inter";
|
||||
src: url("./src/assets/fonts/Inter.ttf") format("truetype-variations");
|
||||
src: local("Inter") format("truetype-variations");
|
||||
font-weight: 100 900;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user