summaryrefslogtreecommitdiff
path: root/src/compiler/parse/read/style.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/parse/read/style.ts')
-rw-r--r--src/compiler/parse/read/style.ts40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/compiler/parse/read/style.ts b/src/compiler/parse/read/style.ts
deleted file mode 100644
index f23d7b10e..000000000
--- a/src/compiler/parse/read/style.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Parser } from '../index.js';
-import { Style } from '../../interfaces.js';
-
-interface Attribute {
- start: number;
- end: number;
- type: 'Attribute';
- name: string;
- value: {
- raw: string;
- data: string;
- }[];
-}
-
-export default function read_style(parser: Parser, start: number, attributes: Attribute[]): Style {
- const content_start = parser.index;
- const styles = parser.read_until(/<\/style>/);
- const content_end = parser.index;
- parser.eat('</style>', true);
- const end = parser.index;
-
- return {
- type: 'Style',
- start,
- end,
- attributes,
- content: {
- start: content_start,
- end: content_end,
- styles,
- },
- };
-}
-
-function is_ref_selector(a: any, b: any) {
- // TODO add CSS node types
- if (!b) return false;
-
- return a.type === 'TypeSelector' && a.name === 'ref' && b.type === 'PseudoClassSelector';
-}