1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-10-24 09:38:51 +02:00
phorge-phorge/webroot/rsrc/css/application/project/project-card-view.css
epriestley c4856c37e7 Fix content overflow in user hovercards
Summary:
Fixes T13273. This element is a bit weird, but I think I fixed it without breaking anything.

The CSS is used by project hovercards and user hovercards, but they each have a class which builds mostly-shared-but-not-really-identical CSS, instead of having a single `View` class with modes. So I'm not 100% sure I didn't break something obscure, but I couldn't find anything this breaks.

The major issue is that all the text content has "position: absolute". Instead, make the image "absolute" and the text actual positioned content. Then fix all the margins/padding/spacing/layout and add overflow. Seems to work?

Plus: hide availability for disabled users, for consistency with D20342.

Test Plan:
Before:

{F6320155}

After:

{F6320156}

I think this is pixel-exact except for the overflow behavior.

Also:

  - Viewed some other user hovercards, including a disabled user. They all looked unchanged.
  - Viewed some project hovercards. They all looked good, too.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13273

Differential Revision: https://secure.phabricator.com/D20344
2019-03-28 21:10:09 -07:00

190 lines
4.1 KiB
CSS

/**
* @provides project-card-view-css
*/
.project-card-view {
margin: 0 12px 16px 0;
text-align: left;
background: {$page.content};
border: 1px solid {$lightblueborder};
border-radius: 3px;
box-shadow: {$dropshadow};
width: 420px;
position: relative;
}
.project-card-view .phui-header-shell {
margin: 0;
padding: 12px 12px 4px 12px;
border: none;
border-radius: 3px;
}
.project-card-view .phui-header-shell .phui-header-image {
border: 3px solid {$page.content};
border-radius: 3px;
background-color: {$page.content};
}
.project-card-view .phui-header-shell .phui-header-header {
font-size: 18px;
width: 290px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: block;
}
.project-card-view .project-card-image {
position: absolute;
height: 140px;
width: 140px;
top: 6px;
left: 6px;
border-radius: 3px;
}
.project-card-view .project-card-image-href {
display: block;
}
.project-card-view .project-card-item div {
display: inline;
}
.project-card-inner {
position: relative;
}
.people-card-view .project-card-inner {
padding: 6px;
min-height: 140px;
}
.project-card-view .project-card-item {
margin-bottom: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.project-card-view .project-card-item-text {
color: {$greytext};
}
.project-card-view .project-card-item-icon {
width: 20px;
}
.project-card-view .project-card-header {
margin-top: 6px;
margin-left: 152px;
overflow: hidden;
}
.project-card-header .project-card-name {
font-size: 20px;
font-weight: bold;
color: {$blacktext};
margin-bottom: 2px;
text-overflow: ellipsis;
white-space: nowrap;
width: 250px;
overflow: hidden;
}
.project-card-header .project-card-username {
font-size: 14px;
color: {$bluetext};
margin-bottom: 12px;
}
.project-card-view .phui-header-shell .phui-header-col1 {
vertical-align: top;
width: 64px;
}
.project-card-view .phui-header-subheader {
font-size: {$normalfontsize};
margin-top: 12px;
padding-bottom: 12px;
}
.project-card-view .phui-header-header .phui-tag-view {
display: block;
font-weight: normal;
color: {$bluetext};
font-size: {$normalfontsize};
font-family: {$fontfamily};
margin-top: 8px;
}
.people-card-view .phui-header-subheader .phui-tag-core {
text-overflow: ellipsis;
white-space: nowrap;
max-width: 232px;
overflow: hidden;
display: inline-block;
}
.project-card-view .phui-header-header .phui-tag-view .phui-tag-core {
padding: 0;
}
.project-card-view .phui-header-header .phui-tag-view .phui-icon-view {
margin-left: 0;
color: {$bluetext};
}
.project-card-view .project-card-body {
padding: 0 12px 12px 12px;
color: {$darkbluetext};
}
/* Colors */
.project-card-view.project-card-red .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-redbackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-orange .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-orangebackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-yellow .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-yellowbackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-green .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-greenbackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-blue .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-bluebackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-indigo .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-indigobackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-violet .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-violetbackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-pink .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-pinkbackground} 42px, {$page.content} 42px);
}
.project-card-view.project-card-grey .phui-header-shell,
.project-card-view.project-card-checkered .phui-header-shell {
background: linear-gradient(to bottom,
{$sh-greybackground} 42px, {$page.content} 42px);
}