Skip to content

Instantly share code, notes, and snippets.

@spivurno
Last active January 22, 2021 01:35
Show Gist options
  • Save spivurno/f72a31ebeaa3c97105643548227a7ded to your computer and use it in GitHub Desktop.
Save spivurno/f72a31ebeaa3c97105643548227a7ded to your computer and use it in GitHub Desktop.
Gravity Perks // File Upload Pro // Big Images
.gpfup-big-images .gpfup__files {
display: flex;
flex-wrap: wrap;
border: 0;
padding: 0;
box-shadow: none;
margin: 0 -0.5rem;
}
.gpfup-big-images .gpfup__file {
width: calc( 50% - 1rem );
border: 0 !important;
padding: 0;
margin: 0 0.5rem 1rem !important;
background: rgba( 0, 0, 0, 0.9 );
border-radius: 4px;
overflow: hidden;
min-height: 100px;
}
.gpfup-big-images .gpfup__preview {
margin-right: 0;
display: grid;
}
.gpfup-big-images .gpfup__preview img {
width: 100% !important;
height: auto !important;
display: block;
margin: auto;
border-radius: 0;
}
.gpfup-big-images .gpfup__file-info {
position: absolute;
bottom: 0;
transition: opacity .3s ease-in-out;
width: 100%;
border-radius: 0 0 4px 4px;
padding: 0.5rem;
color: #fff;
background: #000;
background: linear-gradient(0deg, rgba(2, 0, 36, 1) 0%, rgba(0, 0, 0, 1) 0%, rgba(255, 255, 255, 0) 100%);
margin: 0;
}
.gpfup-big-images .gpfup__filesize {
font-size: 0.8em;
}
.gpfup-big-images .gpfup__file-actions {
top: 0.5rem;
right: 0.5rem;
}
.gpfup-big-images .gpfup__delete {
opacity: 0.7;
transition: opacity 0.25s ease-out;
}
.gpfup-big-images .gpfup__delete svg {
fill: white;
width: 1rem;
filter: drop-shadow( 0 0 1px black );
transition: filter 0.25s ease-out;
}
.gpfup-big-images .gpfup__delete:hover {
opacity: 1;
}
.gpfup-big-images .gpfup__delete:hover svg {
filter: drop-shadow( 0 0 4px black );
}
.gpfup-big-images .gpfup__droparea {
border-radius: 4px;
}
.gpfup-big-images .gpfup__edit {
width: 2.6rem;
height: 2.6rem;
line-height: 1;
}
@cableguysteve
Copy link

Forgive me for asking but where does the css code go to activate this.
Thanks
Steve Fulton, UE

@spivurno
Copy link
Author

Hey Steve, this would be best place in your child theme's style.css file. Then you can activate it on any File-Upload-Pro-enabled field via the CSS Class Name field setting by adding the class "gpfup-big-images". Let me know if you have any quesitons. 🙂

@spivurno
Copy link
Author

@cableguysteve
Copy link

cableguysteve commented Jan 20, 2021 via email

@spivurno
Copy link
Author

Hey Steve, I see you're trying to use this for a single image. Drop us a line via support and we can help you tweak the styles. Drop my name in your ticket. 😄

@cableguysteve
Copy link

Thanks for the message. I am sorry to sound dumb but could you provide me a link to support?
Thanks
Steve

@spivurno
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment