File tree Expand file tree Collapse file tree 1 file changed +0
-58
lines changed
Expand file tree Collapse file tree 1 file changed +0
-58
lines changed Original file line number Diff line number Diff line change 11import walk from 'css-tree/walker'
2- // import { CountableCollection } from '../countable-collection.js'
32
43const systemKeywords = {
54 // Global CSS keywords
@@ -96,60 +95,3 @@ export function getFamilyFromFont(node, stringifyNode) {
9695
9796 return parts
9897}
99-
100- // const analyzeFontFamilies = ({ fontValues, fontFamilyValues, stringifyNode }) => {
101- // const all = new CountableCollection(fontFamilyValues)
102-
103- // for (let index = 0; index < fontValues.length; index++) {
104- // const value = fontValues[index]
105-
106- // // Avoid tree traversal as soon as possible
107- // const firstChild = value.children.first
108-
109- // if (firstChild.type === 'Identifier' && systemKeywords[firstChild.name]) {
110- // continue
111- // }
112-
113- // let parts = ''
114-
115- // walk(value, {
116- // reverse: true,
117- // enter: function (fontNode) {
118- // if (fontNode.type === 'String') {
119- // const loc = fontNode.loc.start
120- // // Stringify the first character to get the correct quote character
121- // const quote = stringifyNode({
122- // loc: {
123- // start: {
124- // line: loc.line,
125- // column: loc.column
126- // },
127- // end: {
128- // line: loc.line,
129- // column: loc.column + 1
130- // }
131- // }
132- // })
133- // return parts = quote + fontNode.value + quote + parts
134- // }
135- // if (fontNode.type === 'Operator' && fontNode.value.charCodeAt(0) === COMMA) {
136- // return parts = fontNode.value + parts
137- // }
138- // if (fontNode.type === 'Identifier') {
139- // if (keywordDisallowList[fontNode.name]) {
140- // return this.skip
141- // }
142- // return parts = fontNode.name + parts
143- // }
144- // }
145- // })
146-
147- // all.push(parts)
148- // }
149-
150- // return all.count()
151- // }
152-
153- // export {
154- // analyzeFontFamilies
155- // }
You can’t perform that action at this time.
0 commit comments