file-icons / atom

Atom file-specific icons for improved visual grepping.
MIT License
1.32k stars 250 forks source link

Markdown Preview Icons miss-aligned on restart of Atom #414

Closed UndefinedOffset closed 8 years ago

UndefinedOffset commented 8 years ago

Using Atom's One Dark theme if you leave a markdown preview window open in two up (at least) and you close and re-open atom the markdown icon is miss-aligned making it appear high on the tab. Left Tab is the editor, and the right tab is the preview.

mardown-icon-miss-align

Alhadis commented 8 years ago

Weird. Seems like it's because the data-name attribute is being added at startup to all existing tabs, whereas newly-opened Markdown previews don't add the attribute. This is what's being used by the CSS to apply styling - if you run $("[data-type=MarkdownPreviewView] > .title").removeAttribute("data-path") in the dev console after startup, you'll notice the offset disappear.

This will be fixed in v2, because v2 doesn't use attribute selectors for styling icons.

Since it's a fairly minor issue, I'll close this... although I'll submit a PR to patch this odd little quirk.

Alhadis commented 8 years ago

Actually, this probably isn't even worth submitting a PR over... :S