/* ========================================================================== metabox.css loads on any Envira Gallery and Album Create/Edit Screen Any styles that will be used by the main Gallery / Album editor screen should be added to this file ========================================================================== */ /* ========================================================================== Imports ========================================================================== */ @import "vars"; @import "mixins"; /* ========================================================================== Messages ========================================================================== */ body.post-type-envira { /** * Add left and right margins to ensure the message notification horizontally lines up * with the metaboxes */ #message { margin: 5px 20px 15px 20px; } #wp-link-wrap{ z-index: 180105 !important; } #wp-link-backdrop{ z-index: 160105 !important; } } /* ========================================================================== Form - The envira-gallery class is assigned to the Gallery and Album Add/Edit screens form. ========================================================================== */ form#post.envira-gallery { /** * Re-establish the left and right margins, so there's spacing between the Admin Menu * and the content */ margin: 0 20px; /** * Defined so we override WordPress' default styles */ #poststuff { /* ========================================================================== Envira Gallery Shared Styles for Types and Settings ========================================================================== */ /** * Intro Text */ p.envira-intro { margin: 0; padding: 0 0 30px 0; border-bottom: 1px solid #ddd; font-size: 16px; font-weight: 700; small { margin: 5px 0 0 0; display: block; font-weight: 400; a { text-decoration: none; font-weight: 600; } } } /** * Help Video * - Can be placed inside p.envira-intro by JS, or outside p.envira-intro when * viewing the Images tab for a Dynamic or Default Gallery */ div.envira-video-help { position: relative; z-index: 1; width: 100%; margin: 20px 0 0 0; iframe { position: relative; z-index: 1; width: 100%; height: auto; min-height: 300px; } a.envira-video-close { position: absolute; z-index: 2; top: -12px; right: -12px; width: 24px; height: 24px; line-height: 24px; @include borderRadius(50%); background: #f5f5f5; color: #000; text-align: center; text-decoration: none; } } /** * Image Grid * - Used on the Images tab for Default Galleries, as well as the Preview Metabox */ ul.envira-gallery-images-output { width: 100%; li { position: relative; display: inline-block; width: 150px; margin: 0 20px 20px 0; padding: 0; list-style: none; vertical-align: top; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; background: #f7f7f7; img { display: block; width: 150px; height: 150px; } /** * If, for some reason, the image doesn't exist or fails to load, * the placeholder logo is displayed */ div.placeholder-image { display: block; width: 148px; height: 149px; background: url(images/icons/leaf.svg) center no-repeat; background-size: 64px 64px; border-left: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; border-right: 1px solid #dfdfdf; } /** * Metadata */ div.meta { width: 148px; overflow: hidden; text-align: center; border-left: 1px solid #dfdfdf; border-bottom: 1px solid #dfdfdf; border-right: 1px solid #dfdfdf; /** * Title */ div.title { font-size: 12px; font-weight: 700; width: 138px; height: 18px; line-height: 18px; margin: 8px 5px; overflow: hidden; /** * Hint * - Displays the full title on hover */ a.hint { position: absolute; display: inline-block; bottom: 10px; right: 10px; width: 16px; height: 16px; background: #f7f7f7; &.hidden { display: none; } } } /** * Additional metadata */ div.additional { display: none; margin: 5px 0 0 0; font-weight: 400; } } /** * Tick Icon */ a.check { display: none; position: absolute; right: 5px; top: 5px; width: 24px; height: 24px; background-color: #eee; -webkit-box-shadow: 0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,0.15); box-shadow: 0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,0.15); div.media-modal-icon { display: none; width: 15px; height: 15px; margin: 5px 0 0 5px; background-position: -21px 0; } } /** * Edit / Delete Buttons */ a.dashicons { position: absolute; display: block; top: 5px; left: 5px; width: 25px; height: 25px; line-height: 25px; font-size: 18px; /* Controls the icon size */ outline: none; z-index: 20; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; &.envira-gallery-modify-image { background: #0085ba; color: $white; } &.envira-gallery-remove-image { left: 35px; background: #e02626; color: $white; } } /** * Selected state */ &.selected { width: 148px; border: 2px solid $green !important; a.check { display: block; background-color: $green; -webkit-box-shadow: 0 0 0 1px #fff,0 0 0 2px $green; box-shadow: 0 0 0 1px #fff,0 0 0 2px $green; div.media-modal-icon { display: block; } } div.meta { width: 146px; } } /** * Multiple selection sorting - stacks images when the user has selected more than one image + dragged them */ &.ui-sortable-helper { li { position: absolute; top: 0; left: 0; } } } /** * List View */ &.list { li { position: relative; z-index: 2; display: block; width: 100%; margin: 0 0 10px 0; padding: 10px 15px; background: #fff; border: 1px solid #ddd; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; img { display: inline-block; width: 75px; margin-left: 45px; } /** * Metadata */ div.meta { position: absolute; z-index: 1; left: 0; display: inline-block; width: 100%; padding: 0 80px 0 150px; border: none; font-weight: 700; text-align: left; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; /** * Title */ div.title { display: block; width: 100%; height: auto; font-size: 16px; margin: 0; padding: 0; a.hint { display: none; } } /** * Additional metadata * - Displayed in list view */ div.additional { display: block; } } /** * Checkbox * - Always display */ a.check { display: block; position: absolute; left: 15px; top: 35px; } a.envira-gallery-remove-image { left: auto; top: 10px; right: 10px; } a.envira-gallery-modify-image { left: auto; top: 10px; right: 40px; } } } } /* ========================================================================== Envira Gallery Type ========================================================================== */ #envira-gallery { margin: 60px 0 20px 0; } #envira-gallery { /** * Hide the title bar of the metabox, so we have a seamless style */ .handlediv { display: none; } .hndle { display: none; } /** * Tabs * - Move up vertically so they sit above the metabox */ h2.nav-tab-wrapper { margin: -56px 0 0 -1px; /* The height of the tab */ padding: 0; border-bottom: none; /** * Increase tab sizes and style */ .nav-tab { display: inline-block; width: 49%; margin: 0; padding: 15px 0; text-align: center; font-size: 16px; border-color: #e5e5e5; /* Matches the metabox border for a seamless UI */ background: #f5f5f5; /** * Envira Gallery Icon */ &.nav-tab-native-envira-gallery { span { display: inline-block; background: url(images/icons/leaf.svg) 0 5px no-repeat; background-size: 14px 14px; text-indent: 20px; } } /** * External Gallery Tab */ &.nav-tab-external-gallery { margin-right: -1px; } /** * Hover and Active States */ &:hover, &.envira-active { background: $white; border-bottom: 1px solid $white; } /** * Focus State * - Remove WordPress' blue focus box from tabs */ &:focus { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } &:last-child { float: right; } /** * Hides the radio input on a label * The radio input will be selected when the label is clicked */ input[type=radio] { display: none; } } } /** * Tab Settings */ .inside { margin: 0; padding: 0; /** * Native Envira Gallery Uploader / Select Files * - Styles the pluploader instance to look the way we want it * - Also see responsive styles at the end of this file */ #envira-gallery-native { #plupload-upload-ui { /* Reserves the space needed for the drag-drop-area, which is loaded using JS */ height: 210px; /** * A drag-drop-area div is always output, whether we're on a touch * device or not. WordPress will only style this div if its parent * has the .drag-drop class (i.e. touch devices won't get any CSS styling) * * The below CSS ensures that the drag drop area looks consistent * regardless of device used, and then adjusts the layout if drag-drop is supported. */ #drag-drop-area { display: none; border: 4px dashed #b4b9be; height: 200px; .drag-drop-inside { margin: 0 auto 0 auto; p { display: block; text-align: center; color: #a0a5aa; position: absolute; top: 50%; left: 50%; margin: -10px 0 0 -10px; /** * "Drop Files here" */ &.drag-drop-info { display: none; font-size: 20px; } &.drag-drop-buttons { text-align: center; position: relative; top: 20px; left: 0; margin: 0; } } } } /** * Select Files from Other Sources Button */ a.envira-media-library.button { display: none; position: absolute; margin: 0 auto; left: 280px; right: 0; width: 230px; top: 115px; text-align: center; } /** * When the uploader supports drag and drop, a .drag-drop * class is appended to #drag-drop-area by WordPress * * We use this to show certain descriptions */ &.drag-drop { #drag-drop-area { .drag-drop-inside { width: 520px; margin: 50px auto 0 auto; p { position: relative; top: 0; left: 0; margin: 0; } p.drag-drop-info { display: block; } p.drag-drop-buttons { margin: 10px 0 0 0; text-align: left; } } } } /** * Upload Progress Bar */ .envira-progress-bar { display: none; width: 100%; position: relative; height: 10px; width: 100%; margin: 10px auto; border-radius: 10px; background: #dfdfdf; background: rgba(0,0,0,.1); .envira-progress-bar-inner { height: 10px; min-width: 20px; width: 0; background: #aaa; background: rgba(0,0,0,.2); border-radius: 10px; -webkit-transition: width 300ms; -moz-transition: width 300ms; -ms-transition: width 300ms; -o-transition: width 300ms; transition: width 300ms; } .envira-progress-bar-status { clear: both; position: absolute; right: 0; width: 50%; height: 30px; margin: 12px 0 0 0; text-align: right; .uploading { } .done { display: none; } } } /** * Upload Progress Bar */ .envira-progress-adding-images { display: none; width: 100%; position: relative; height: 10px; width: 100%; margin: 5px auto; border-radius: 10px; /* background: #dfdfdf; background: rgba(0,0,0,.1); */ .envira-progress-bar-inner { height: 10px; min-width: 20px; width: 0; /* background: #aaa; background: rgba(0,0,0,.2);*/ border-radius: 10px; /* -webkit-transition: width 300ms; -moz-transition: width 300ms; -ms-transition: width 300ms; -o-transition: width 300ms; transition: width 300ms;*/ } .envira-progress-status { clear: both; position: absolute; right: 0; width: 50%; height: 30px; margin: 12px 0 0 0; text-align: right; color: green; -webkit-transition: 0.05s color ease-in-out; transition: 0.05s color ease-in-out; .spinner { float: right; margin-top: 0; visibility: visible; } .adding_images { float: right; display: inline-block; } } } p.upload-flash-bypass { display: none; } } } div.envira-tab { padding: 20px; /** * External Gallery Tab Area */ &#envira-gallery-external { text-align: center; /** * Header */ p.envira-intro { margin: 0 0 20px 0; padding: 0; border: none; } /** * External Gallery Types */ ul#envira-gallery-types-nav { margin: 0 0 40px 0; text-align: center; li { display: inline-block; margin: 0 20px 0 0; vertical-align: top; &:last-child { margin: 0; } /** * Pro uses a