mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-12 19:02:53 +08:00
feat: remove firaMono
This commit is contained in:
parent
7dfbb9f40a
commit
0bf452c906
@ -1,4 +1,3 @@
|
||||
import { Fira_Mono } from "next/font/google";
|
||||
import localFont from "next/font/local";
|
||||
|
||||
const monaSans = localFont({
|
||||
@ -8,11 +7,4 @@ const monaSans = localFont({
|
||||
fallback: ["Futura, Helvetica, sans-serif", "Tahoma, Verdana, sans-serif"],
|
||||
});
|
||||
|
||||
const firaMono = Fira_Mono({
|
||||
weight: ["500"],
|
||||
subsets: ["latin"],
|
||||
display: "swap",
|
||||
fallback: ["Menlo, Monaco, monospace", "Consolas, Courier New, monospace"],
|
||||
});
|
||||
|
||||
export { monaSans, firaMono };
|
||||
export { monaSans };
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import { firaMono } from "src/constants/fonts";
|
||||
import { Graph } from "src/containers/Views/GraphView";
|
||||
import { TreeView } from "src/containers/Views/TreeView";
|
||||
import { ViewMode } from "src/enums/viewMode.enum";
|
||||
@ -16,7 +15,7 @@ const StyledLiveEditor = styled.div`
|
||||
& > ul {
|
||||
margin-top: 0 !important;
|
||||
padding: 12px !important;
|
||||
font-family: ${firaMono.style.fontFamily};
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import styled, { DefaultTheme } from "styled-components";
|
||||
import { LinkItUrl } from "react-linkify-it";
|
||||
import { firaMono } from "src/constants/fonts";
|
||||
|
||||
type TextColorFn = {
|
||||
theme: DefaultTheme;
|
||||
@ -34,7 +33,7 @@ export const StyledLinkItUrl = styled(LinkItUrl)`
|
||||
export const StyledForeignObject = styled.foreignObject<{ $isObject?: boolean }>`
|
||||
text-align: ${({ $isObject }) => !$isObject && "center"};
|
||||
color: ${({ theme }) => theme.NODE_COLORS.TEXT};
|
||||
font-family: ${firaMono.style.fontFamily};
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { firaMono } from "src/constants/fonts";
|
||||
import useConfig from "src/store/useConfig";
|
||||
|
||||
type Text = string | [string, string][];
|
||||
@ -34,7 +33,7 @@ const calculateWidthAndHeight = (str: string, single = false) => {
|
||||
dummyElement.style.padding = "10px";
|
||||
dummyElement.style.fontWeight = "500";
|
||||
dummyElement.style.overflowWrap = "break-word";
|
||||
dummyElement.style.fontFamily = firaMono.style.fontFamily;
|
||||
dummyElement.style.fontFamily = "monospace";
|
||||
document.body.appendChild(dummyElement);
|
||||
|
||||
const clientRect = dummyElement.getBoundingClientRect();
|
||||
|
Loading…
x
Reference in New Issue
Block a user