Skip to content

Commit bae6eea

Browse files
committed
Move to import type style, switch back to src import
1 parent 702caa6 commit bae6eea

File tree

6 files changed

+29
-31
lines changed

6 files changed

+29
-31
lines changed

index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
}
6262
</style>
6363
<script type="module">
64-
// Todo: Switch back to loading from /src/index-fn.ts
65-
import polyfill from '/dist/css-anchor-positioning-fn.js'
64+
import polyfill from '/src/index-fn.ts';
6665

6766
const SUPPORTS_ANCHOR_POSITIONING =
6867
'anchorName' in document.documentElement.style;

src/cascade.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type Block, type CssNode } from 'css-tree';
1+
import type { Block, CssNode } from 'css-tree';
22
import walk from 'css-tree/walker';
33

44
import {

src/fallback.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import {
2-
type Atrule,
3-
type Block,
4-
type CssNode,
5-
type Declaration,
6-
type Identifier,
7-
type Raw,
8-
type Rule,
9-
type SelectorList,
10-
type Value,
1+
import type {
2+
Atrule,
3+
Block,
4+
CssNode,
5+
Declaration,
6+
Identifier,
7+
Raw,
8+
Rule,
9+
SelectorList,
10+
Value,
1111
} from 'css-tree';
1212
import { clone, List } from 'css-tree/utils';
1313
import walk from 'css-tree/walker';

src/parse.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import {
2-
type CssNode,
3-
type Declaration,
4-
type FunctionNode,
5-
type Identifier,
6-
type List,
7-
type Percentage,
8-
type SelectorList,
1+
import type {
2+
CssNode,
3+
Declaration,
4+
FunctionNode,
5+
Identifier,
6+
List,
7+
Percentage,
8+
SelectorList,
99
} from 'css-tree';
1010
import walk from 'css-tree/walker';
1111
import { nanoid } from 'nanoid/non-secure';

src/utils.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import {
2-
type CssNode,
3-
type Declaration,
4-
type FunctionNode,
5-
type Identifier,
6-
type List,
7-
type Selector as CssTreeSelector,
8-
type SelectorList,
9-
type Value,
1+
import type {
2+
CssNode,
3+
Declaration,
4+
FunctionNode,
5+
Identifier,
6+
List,
7+
Selector as CssTreeSelector,
8+
SelectorList,
9+
Value,
1010
} from 'css-tree';
1111
import generate from 'css-tree/generator';
1212
import parse from 'css-tree/parser';

vite.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export default defineConfig({
4343
},
4444
},
4545
plugins: [bundleStats()],
46-
4746
/**
4847
* @see https://vitest.dev/config/#configuration
4948
*/

0 commit comments

Comments
 (0)