Comments (6)
Hi Jim,
You should be able to override the style with your own CSS.
Like if you wanted a blue close button for captions you could do
#bp_caption .bp-x {
background: #4083d7!important;
}
Is there something in particular you're having trouble with?
from bigpicture.
@henrygd it's not a trouble but more giving flexibility to adapt the style to different design.
It's only about background color...
from bigpicture.
I'd like to leave it as is because I think part of the appeal is that it's an easy one file drop in solution.
But here's the scss if you want it. You can delete lines 156-158 in the script if you use this directly.
#bp_caption {
bottom: 0;
left: 0;
right: 0;
position: fixed;
opacity: 0;
}
#bp_container {
bottom: 0;
left: 0;
right: 0;
position: fixed;
opacity: 0;
> * {
position: absolute;
right: 0;
}
}
.bp-x, #bp_loader {
position: absolute;
right: 0;
}
#bp_container {
top: 0;
z-index: 9999;
background: rgba(0, 0, 0, 0.7);
opacity: 0;
pointer-events: none;
transition: opacity .35s;
}
#bp_loader {
top: 0;
left: 0;
bottom: 0;
display: -webkit-flex;
display: flex;
margin: 0;
cursor: wait;
z-index: 9;
svg {
width: 40%;
max-height: 40%;
margin: auto;
-webkit-animation: ldr .7s infinite linear;
animation: -webkit-ldr .7s infinite linear;
animation: ldr .7s infinite linear;
}
}
@-webkit-keyframes ldr {
to {
-webkit-transform: rotate(1turn);
transform: -webkit-rotate(1turn);
transform: rotate(1turn);
}
}
@keyframes ldr {
to {
-webkit-transform: rotate(1turn);
transform: -webkit-rotate(1turn);
transform: rotate(1turn);
}
}
#bp_container img, #bp_sv, #bp_vid {
max-height: 96%;
max-width: 96%;
top: 0;
bottom: 0;
left: 0;
margin: auto;
box-shadow: 0 0 3em rgba(0, 0, 0, 0.4);
z-index: -1;
}
#bp_sv {
width: 171vh;
}
#bp_caption {
font-size: .9em;
padding: 1.3em;
background: rgba(15, 15, 15, 0.94);
color: #fff;
text-align: center;
transition: opacity .3s;
}
.bp-x {
font-family: Arial;
top: 0;
cursor: pointer;
opacity: .8;
font-size: 3em;
padding: 0 .3em;
color: #fff;
background: transparent;
border: 0;
text-shadow: 0 0 2px #000;
}
#bp_caption .bp-x {
left: 2%;
top: auto;
right: auto;
bottom: 100%;
padding: 0 .6em;
background: #d74040;
border-radius: 2px 2px 0 0;
font-size: 2.3em;
text-shadow: none;
}
.bp-x {
&:hover, &:focus {
opacity: 1;
}
&:active {
outline: 0;
}
}
@media (max-aspect-ratio: 9 / 5) {
#bp_sv {
height: 53vw;
}
}
from bigpicture.
Not good solution for long term use (updating will be a pain in the ass)
What you could do is separate style and js and put them in a source folder while compile version will stay in dist folder.
That way you'll keep thing simple as you like while offering a possibility of customisation.
What do you think ?
from bigpicture.
That's a good suggestion, but everything is so simple that I don't know if it's really needed. Not many people are going to change the style and those that do are only going to be concerned with a few lines. Using !important seems like a reasonable solution to me.
from bigpicture.
Nah! !important is the worst... But no worries I understand your point
from bigpicture.
Related Issues (20)
- Feature request: optional params Youtube HOT 1
- Not work multiple ( HOT 1
- Feature request? Can I programmatically close the lightbox? HOT 3
- dimensions not working for <video> HOT 3
- Feature request. support for responsive images by using srcset attribute HOT 1
- Destroy BigPicture HOT 2
- Add support for start time for YouTube videos HOT 1
- Feature request. Make use of youtube nocookie domain. HOT 2
- Content Security Error - refused to evaluate string HOT 2
- Es6 modules HOT 1
- Separate scripts for video demos HOT 3
- Feature request: Option to pass controlslist value to HTML Video HOT 2
- Feature request: add swipe support HOT 3
- Feature request: support pinch zoom in/out HOT 1
- Full screen button on Vimeo player not working when browser is full screen HOT 1
- Feature request - support for iframes with variable height HOT 8
- Feature request: Publish 2.6.0 to npm HOT 1
- Feature request : control the video looping HOT 6
- Feature Request: Fill screen HOT 3
- Youtube videos start in lower quality HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bigpicture.