sad 'fix': remove reward tooltip on file page

This commit is contained in:
Sean Yesmunt 2019-02-05 12:03:18 -05:00
parent eebe0defde
commit 39739c6beb
3 changed files with 33 additions and 23 deletions

View file

@ -170,7 +170,15 @@ class FilePage extends React.Component<Props> {
<div className="media__properties media__properties--large"> <div className="media__properties media__properties--large">
{isRewardContent && ( {isRewardContent && (
<Icon size={20} iconColor="red" tooltip="bottom" icon={icons.FEATURED} /> <Icon
size={20}
iconColor="red"
icon={icons.FEATURED}
// Figure out how to get the tooltip to overlap the navbar on the file page and I will love you
// https://stackoverflow.com/questions/6421966/css-overflow-x-visible-and-overflow-y-hidden-causing-scrollbar-issue
// https://spee.ch/4/overflow-issue
// tooltip="bottom"
/>
)} )}
{metadata.nsfw && <div className="badge badge--nsfw">NSFW</div>} {metadata.nsfw && <div className="badge badge--nsfw">NSFW</div>}
<FilePrice badge uri={normalizeURI(uri)} /> <FilePrice badge uri={normalizeURI(uri)} />

View file

@ -62,6 +62,7 @@
30% { 30% {
width: 0.5rem; width: 0.5rem;
} }
40% { 40% {
width: 0; width: 0;
} }

View file

@ -1,9 +1,10 @@
.tooltip { .tooltip {
display: inline-block; display: inline-block;
position: relative; position: relative;
z-index: 2;
.tooltip__body { .tooltip__body {
z-index: 2;
visibility: hidden; visibility: hidden;
} }
@ -17,7 +18,7 @@
font-size: 1rem; font-size: 1rem;
color: $lbry-black; color: $lbry-black;
font-weight: 400; font-weight: 400;
padding: var(--spacing-vertical-small); padding: var(--spacing-vertical-miniscule);
position: absolute; position: absolute;
text-align: center; text-align: center;
white-space: pre-wrap; white-space: pre-wrap;
@ -28,7 +29,7 @@
border-radius: 0.5rem; border-radius: 0.5rem;
&.tooltip__body--short { &.tooltip__body--short {
width: 130px; width: 110px;
} }
&::after { &::after {
@ -100,22 +101,6 @@
} }
} }
.tooltip--bottom .tooltip__body {
top: 90%;
left: 50%;
margin-left: -100px;
&.tooltip__body--short {
margin-left: -65px;
}
&::after {
bottom: 101%;
left: 50%;
margin-left: -5px;
}
}
.tooltip--left .tooltip__body { .tooltip--left .tooltip__body {
top: -5px; top: -5px;
right: 105%; right: 105%;
@ -128,23 +113,39 @@
} }
.tooltip--right .tooltip__body { .tooltip--right .tooltip__body {
margin-top: -30px; margin-top: -28px;
margin-left: 110%; margin-left: 110%;
&::after { &::after {
top: 17px; top: 14px;
right: 100%; // To the left of the tooltip right: 100%; // To the left of the tooltip
margin-top: -5px; margin-top: -5px;
} }
} }
.tooltip--bottom .tooltip__body {
top: 90%;
left: 50%;
margin-left: -100px;
&.tooltip__body--short {
margin-left: -56px;
}
&::after {
bottom: 100%;
left: 50%;
margin-left: -5px;
}
}
.tooltip--top .tooltip__body { .tooltip--top .tooltip__body {
bottom: 120%; bottom: 120%;
left: 50%; left: 50%;
margin-left: -100px; margin-left: -100px;
&.tooltip__body--short { &.tooltip__body--short {
margin-left: -65px; margin-left: -56px;
} }
&::after { &::after {