Skip to content

Commit

Permalink
export getCSSProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
FIameCaster committed Aug 16, 2024
1 parent 8e637d1 commit 385d125
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package/src/extensions/autocomplete/css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const atRule = /@([\w-]*)(?!\w|-)(?:[^;{"']|"(?:\\[\s\S]|[^\\\n"])*"|'(?:\\[\s\S

const tagNames: Completion[] = Object.keys(htmlTags).map(tag => ({ label: tag, icon: "keyword" }))

const getProperties = () => {
const getCSSProperties = () => {
if (!properties) {
properties = []
const style = document.body.style
Expand Down Expand Up @@ -65,7 +65,7 @@ const cssCompletion = (
if (getClosestToken(editor, ".comment,.string", 0, 0, pos)) return

if (getClosestToken(editor, ".tag", 0, 0, pos)) {
options = currentStatement.includes(":") ? cssValues : getProperties()
options = currentStatement.includes(":") ? cssValues : getCSSProperties()
} else {
const atRuleMatch = atRule.exec(before)

Expand Down Expand Up @@ -124,7 +124,7 @@ const cssCompletion = (
).map(name => ({
label: name,
}))
options.push(...(currentStatement.includes(":") ? cssValues : getProperties()))
options.push(...(currentStatement.includes(":") ? cssValues : getCSSProperties()))
}
}
}
Expand All @@ -139,4 +139,4 @@ const cssCompletion = (

let properties: Completion[]

export { cssCompletion, cssValues, pseudoClasses, pseudoElements, atRules }
export { cssCompletion, cssValues, pseudoClasses, pseudoElements, atRules, getCSSProperties }

0 comments on commit 385d125

Please # to comment.