Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Removing the unneeded negative margin trick used to position icons. #10002

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/styles/jsTreeTheme.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,9 @@ 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);
Copy link
Member

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.

display: block;
}

Expand Down