MCPcopy Create free account
hub / github.com/editablejs/editable / compareStyle

Function compareStyle

packages/plugins/list/src/styles.tsx:77–93  ·  view source on GitHub ↗
(style: CSSStyleDeclaration)

Source from the content-addressed store, hash-verified

75 let font: FontStyle | null = null
76
77 const compareStyle = (style: CSSStyleDeclaration) => {
78 if (!font) {
79 font = {
80 size: style.fontSize,
81 weight: style.fontWeight,
82 color: style.color,
83 }
84 } else if (
85 font.size !== style.fontSize ||
86 font.weight !== style.fontWeight ||
87 font.color !== style.color
88 ) {
89 font = null
90 return false
91 }
92 return true
93 }
94
95 const traverse = (element: Element) => {
96 for (const child of element.children) {

Callers 1

traverseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…