Skip to content

Commit

Permalink
Chrome-style tracking icon
Browse files Browse the repository at this point in the history
  • Loading branch information
muckSponge committed Nov 7, 2019
1 parent 98950f1 commit 3bd769b
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 7 deletions.
4 changes: 4 additions & 0 deletions chrome/icons/content-blocker-active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions chrome/icons/content-blocker-inactive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions chrome/icons/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@
list-style-image: url(incognito.svg) !important;
}

#tracking-protection-icon
{
list-style-image: url(content-blocker-inactive.svg) !important;
}

#tracking-protection-icon-box[active] #tracking-protection-icon
{
list-style-image: url(content-blocker-active.svg) !important;
}

#pageActionButton
{
list-style-image: url(menu.svg) !important;
Expand Down
60 changes: 53 additions & 7 deletions chrome/urlbar/urlbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
.urlbar-icon,
.searchbar-search-button,
#identity-box,
#tracking-protection-icon-container
#tracking-protection-icon-box
{
min-width: 32px !important;
height: 24px !important;
Expand All @@ -395,10 +395,54 @@
background-color: transparent !important;
}

#tracking-protection-icon-container
{
background: 0 !important;
border: 0 !important;
margin: 0 !important;
padding: 0 !important;
width: auto !important;
order: 97 !important;
}

#tracking-protection-icon-box
{
position: relative !important;
display: block !important;
width: 32px !important;
}

#tracking-protection-icon-box
{
transition:
background-color .2s var(--ease-basic),
width .15s var(--ease-in),
opacity .15s var(--ease-basic),
visibility 0s .2s !important;
opacity: 0 !important;
visibility: hidden !important;
width: 0 !important;
}

#urlbar:hover #tracking-protection-icon-box,
#tracking-protection-icon-box[active]
{
transition:
background-color .2s var(--ease-basic),
width .3s var(--ease-out),
opacity .3s var(--ease-basic) !important;
opacity: 1 !important;
visibility: visible !important;
width: 32px !important;
}

#tracking-protection-icon
{
display: block !important;
}

#tracking-protection-icon-animatable-box
{
display: none !important;
}

#identity-box #notification-popup-box
Expand All @@ -410,6 +454,8 @@
#page-action-buttons
{
height: 24px !important;
display: flex !important;
order: 99 !important;
}

#urlbar[open] #page-action-buttons
Expand All @@ -420,7 +466,7 @@
.urlbar-icon:hover:not([disabled]),
.searchbar-search-button:hover,
#identity-box:hover:not(.no-hover),
#tracking-protection-icon-container:hover
#tracking-protection-icon-container:hover #tracking-protection-icon-box
{
background-color: var(--toolbarbutton-hover-background) !important;
}
Expand All @@ -430,25 +476,25 @@
.searchbar-search-button:hover:active,
#identity-box:hover:active:not(.no-hover),
#identity-box[open]:not(.no-hover),
#tracking-protection-icon-container[open]
#tracking-protection-icon-container[open] #tracking-protection-icon-box
{
background-color: var(--toolbarbutton-active-background) !important;
transition-duration: 0 !important;
}

#star-button-box
{
-moz-box-ordinal-group: 99 !important;
order: 99 !important;
}

#pageActionButton
{
-moz-box-ordinal-group: 98 !important;
order: 98 !important;
}

#contextual-feature-recommendation
{
-moz-box-ordinal-group: 97 !important;
order: 96 !important;
width: auto !important;
}

Expand Down

0 comments on commit 3bd769b

Please sign in to comment.