This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Removing the unneeded negative margin trick used to position icons. #10002
Closed
Closed
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,18 +53,14 @@ li.jstree-closed > ul { display:none; } | |
|
||
@jstree-icon-backindent: 12px; | ||
|
||
/* Make the links in the JS tree the width of the container | ||
* by shifting the off the screen by negative margin and moving the | ||
* content back by pushing the padding. The icons are positioned absolute | ||
* relative to the containing list item so they sit above the a's background. | ||
* This also means we need to include the size of the sprite in the padding | ||
* so the text ends up back in the same spot visually | ||
*/ | ||
.jstree-brackets li > a { | ||
@jstree-icon-text-overlap: 2px; | ||
padding-left: (@jstree-sprite-size - @jstree-icon-backindent - @jstree-icon-text-overlap + 10000px); | ||
margin-left: -10000px; | ||
padding-left: (@jstree-sprite-size - @jstree-icon-backindent - @jstree-icon-text-overlap); | ||
display: block; | ||
|
||
/* Explicitly remove the focus ring to fix https://github.com/adobe/brackets/issues/9987 */ | ||
box-shadow: none; | ||
outline: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For #9987, it seems like we should just fix the bug that's causing the sidebar to get focus in the first place -- then we wouldn't need this change. I thought that focus bug (which also occurs on master) was filed, but it looks like I was wrong. I only see #9414, but that's a lower-priority bug about temporary focus loss when clicking a file -- the issue we're seeing lately is persistent focus loss when clicking a folder. I think we can just use #9987 to track that issue, since fixing the focus loss itself seems like the right fix for the visible focus ring. |
||
} | ||
|
||
.jstree li { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good as a fix/workaround for #9965.