mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Live CSS: Show the Matched CSS header even if no rules match
This commit is contained in:
parent
0e3460d709
commit
b58cd915f6
Binary file not shown.
@ -344,7 +344,8 @@ class PreviewIntegration
|
||||
is_ancestor = false
|
||||
while target and target.ownerDocument
|
||||
css = get_matched_css(target, is_ancestor, all_properties)
|
||||
if css.length > 0
|
||||
# We want to show the Matched CSS rules header even if no rules matched
|
||||
if css.length > 0 or not is_ancestor
|
||||
ans['nodes'].push({'name':target.tagName?.toLowerCase(), 'css':css, 'is_ancestor':is_ancestor, 'sourceline':target.getAttribute('data-lnum')})
|
||||
target = target.parentNode
|
||||
is_ancestor = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user