Skip to content

Commit

Permalink
Move to import type style, switch back to src import
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Nov 22, 2024
1 parent 702caa6 commit bae6eea
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 31 deletions.
3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
}
</style>
<script type="module">
// Todo: Switch back to loading from /src/index-fn.ts
import polyfill from '/dist/css-anchor-positioning-fn.js'
import polyfill from '/src/index-fn.ts';

const SUPPORTS_ANCHOR_POSITIONING =
'anchorName' in document.documentElement.style;
Expand Down
2 changes: 1 addition & 1 deletion src/cascade.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Block, type CssNode } from 'css-tree';
import type { Block, CssNode } from 'css-tree';
import walk from 'css-tree/walker';

import {
Expand Down
20 changes: 10 additions & 10 deletions src/fallback.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {
type Atrule,
type Block,
type CssNode,
type Declaration,
type Identifier,
type Raw,
type Rule,
type SelectorList,
type Value,
import type {
Atrule,
Block,
CssNode,
Declaration,
Identifier,
Raw,
Rule,
SelectorList,
Value,
} from 'css-tree';
import { clone, List } from 'css-tree/utils';
import walk from 'css-tree/walker';
Expand Down
16 changes: 8 additions & 8 deletions src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
type CssNode,
type Declaration,
type FunctionNode,
type Identifier,
type List,
type Percentage,
type SelectorList,
import type {
CssNode,
Declaration,
FunctionNode,
Identifier,
List,
Percentage,
SelectorList,
} from 'css-tree';
import walk from 'css-tree/walker';
import { nanoid } from 'nanoid/non-secure';
Expand Down
18 changes: 9 additions & 9 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
type CssNode,
type Declaration,
type FunctionNode,
type Identifier,
type List,
type Selector as CssTreeSelector,
type SelectorList,
type Value,
import type {
CssNode,
Declaration,
FunctionNode,
Identifier,
List,
Selector as CssTreeSelector,
SelectorList,
Value,
} from 'css-tree';
import generate from 'css-tree/generator';
import parse from 'css-tree/parser';
Expand Down
1 change: 0 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default defineConfig({
},
},
plugins: [bundleStats()],

/**
* @see https://vitest.dev/config/#configuration
*/
Expand Down

0 comments on commit bae6eea

Please sign in to comment.