-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to css-in-js with linaria (#2256)
* Set up linaria * Move `@linaria/core` to dev deps * rm stylesheet import from the readme * simplify `@supports` selector * migrate all core styles * migrate row styles * Fix rowClass tests * migrate cell styles * fix lighten() * migrate editor styles * migrate header styles * migrate remaining styles, cleanups * rm `--no-dll` flags * rm remaining references to `tools/` * can't use lighten/darken, so let's use hsl instead * Augment the generated class names * migrate remaining story styles, rm less * unnecessary clsx * Fix tests * Move some styles to their respective component modules Co-authored-by: Aman Mahajan <[email protected]>
- Loading branch information
1 parent
2e45f1c
commit 253c626
Showing
60 changed files
with
837 additions
and
762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/.linaria-cache | ||
/coverage | ||
/dist | ||
/lib | ||
/node_modules | ||
/storybook-static | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,58 @@ | ||
import 'core-js/stable'; | ||
import '../style/index.less'; | ||
import '../stories/index.less'; | ||
import { ResizeObserver as Polyfill } from '@juggle/resize-observer'; | ||
import { css } from '@linaria/core'; | ||
|
||
// @ts-expect-error | ||
if (typeof ResizeObserver === 'undefined') { | ||
// @ts-expect-error | ||
window.ResizeObserver = Polyfill; | ||
} | ||
|
||
css` | ||
:global() { | ||
body, | ||
html { | ||
padding: 0 !important; | ||
margin: 0 !important; | ||
font-family: sans-serif; | ||
} | ||
#root { | ||
display: flex; | ||
flex-direction: column; | ||
box-sizing: border-box; | ||
height: 100vh; | ||
padding: 8px; | ||
} | ||
.rdg.fill-grid { | ||
height: 100%; | ||
} | ||
.rdg.small-grid { | ||
height: 300px; | ||
} | ||
.rdg.big-grid { | ||
height: 600px; | ||
} | ||
:root { | ||
@media (prefers-color-scheme: light) { | ||
background-color: #fff; | ||
color: #111; | ||
} | ||
@media (prefers-color-scheme: dark) { | ||
background-color: #111; | ||
color: #fff; | ||
} | ||
} | ||
.rdg-cell .Select { | ||
max-height: 30px; | ||
font-size: 12px; | ||
font-weight: normal; | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.