Last active
April 24, 2019 20:33
-
-
Save HazemAM/cb5808c96991a4762528f1752e28c8d3 to your computer and use it in GitHub Desktop.
A user style for better styling for the duplicate link icon of the ClutterFree extension.
This file contains 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
/* ==UserStyle== | |
@name ClutterFree duplicate link icon facelift | |
@description Better styling for the duplicate link icon of the ClutterFree extension. | |
@author Hazem AbuMostafa (http://hazemam.com) | |
@homepageURL https://gist.github.com/HazemAM/cb5808c96991a4762528f1752e28c8d3 | |
@updateURL https://gist.github.com/HazemAM/cb5808c96991a4762528f1752e28c8d3/raw/clutterfree-duplicate-link-icon.user.css | |
@namespace github.com/hazemam | |
@version 1.1.1 | |
@license Apache-2.0 | |
@var number size "Icon size" [15, 0, null, 1, 'px'] | |
==/UserStyle== */ | |
:root { | |
--reverse-size: calc(var(--size) * -1); | |
} | |
a.clutterFree_existingDuplicate.cf_div_theme_light:not(.clutterFree_noIcon), | |
a.clutterFree_existingDuplicate.cf_div_theme_dark:not(.clutterFree_noIcon) { | |
position: relative; | |
} | |
a.clutterFree_existingDuplicate.cf_div_theme_light:not(.clutterFree_noIcon)::after, | |
a.clutterFree_existingDuplicate.cf_div_theme_dark:not(.clutterFree_noIcon)::after { | |
content: ''; | |
position: absolute; | |
height: var(--size); | |
width: var(--size); | |
right: var(--reverse-size); | |
top: calc(var(--reverse-size) / 2); | |
z-index: 999; | |
opacity: 1; | |
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); | |
border-radius: 50%; | |
background-size: calc(var(--size) - 2px); | |
background-repeat: no-repeat; | |
background-position: center center; | |
transition: opacity 0.25s ease; | |
} | |
a.clutterFree_existingDuplicate.cf_div_theme_light:not(.clutterFree_noIcon)::after { | |
background-color: white; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z' fill='black'/><path d='M0 0h24v24H0z' fill='none'/></svg>"); | |
} | |
a.clutterFree_existingDuplicate.cf_div_theme_dark:not(.clutterFree_noIcon)::after { | |
background-color: black; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z' fill='white'/><path d='M0 0h24v24H0z' fill='none'/></svg>"); | |
} | |
a.clutterFree_existingDuplicate.cf_div_theme_light:not(.clutterFree_noIcon):hover::after { | |
background-color: hsla(200, 75%, 95%, 1); | |
} | |
a.clutterFree_existingDuplicate.cf_div_theme_dark:not(.clutterFree_noIcon):hover::after { | |
background-color: hsla(200, 75%, 5%, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment