Skip to content

Commit

Permalink
Merge pull request #477 from masakudamatsu/474-modern-css-reset
Browse files Browse the repository at this point in the history
Incorporate josh Comeau's CSS reset
  • Loading branch information
masakudamatsu authored Oct 9, 2023
2 parents 51fd0b2 + 63433a5 commit a1393e3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/elements/GlobalStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ import {ress} from 'src/utils/cssRess';
import {resetRangeInput} from 'src/utils/cssResetRangeInput';
import {resetSearchInput} from 'src/utils/cssResetSearchInput';

const disableMacOSSubpixelFontSmoothing = `
body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
`;

const hardwrapLongWord = `
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
`;

const setRootStackingContext = `
/* See Section 8 of https://www.joshwcomeau.com/css/custom-css-reset/ */
#__next {
isolation: isolate;
}
`;

const makeMapFullscreen = `
:root,
body,
Expand Down Expand Up @@ -90,6 +110,9 @@ export const GlobalStyle = createGlobalStyle`
${ress}
${resetRangeInput}
${resetSearchInput}
${disableMacOSSubpixelFontSmoothing}
${hardwrapLongWord}
${setRootStackingContext}
input {
color: inherit; /* Prevent Chrome from applying "internal-light-dark" to override the body element's color property */
Expand Down

1 comment on commit a1393e3

@vercel
Copy link

@vercel vercel bot commented on a1393e3 Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.