mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 02:14:47 +01:00
Live CSS: Show the Matched CSS header even if no rules match
This commit is contained in:
parent
0e3460d709
commit
b58cd915f6
2 changed files with 2 additions and 1 deletions
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…
Reference in a new issue