Page 1 of 1

Picture frame

Posted: 20 Jan 2017, 14:52
by Mi.Rog
Is it possible to change picture frame size and color?

Re: Picture frame

Posted: 20 Jan 2017, 23:01
by mjau-mjau
There are no settings for this, but it can easily be achieved with custom CSS. Do you have a link to a page you want frames changes, so I have a reference for the custom CSS code?

Re: Picture frame

Posted: 31 Jan 2017, 15:14
by Mi.Rog

Re: Picture frame

Posted: 31 Jan 2017, 22:32
by mjau-mjau
1. Go to Settings -> Custom -> custom CSS, add your own .myframe style, and set the width/color as you like:
Code
.myframe figure {
  border: 10px solid #FFFFFF;
  background: #FFFFFF;
}
2. Go to the page Settings -> Gallery, remove the "frame" style:
Image

3. Add your custom "myframe" style instead:
Image

Done.

---

... If you want to set this globally for all galleries, with option to remove on a per-gallery basis, go to main Settings -> Page -> Gallery -> Default Classes, remove "frame" and add "myframe":
Image

Re: Picture frame

Posted: 01 Feb 2017, 13:29
by Mi.Rog
Thank you  :relaxed:That's it!

Re: Picture frame

Posted: 09 Jul 2020, 02:44
by pede
The CSS myframe style does not affect the border of the videos. How can I change the color and width of the border of videos in the gallery or at least turn it off?
Black border video.jpg
Black border video.jpg (24.2 KiB) Viewed 2133 times

Re: Picture frame

Posted: 09 Jul 2020, 06:28
by mjau-mjau
pede wrote: The CSS myframe style does not affect the border of the videos. How can I change the color and width of the border of videos in the gallery or at least turn it off?
Black border video.jpg
Do you have a link for me? Would be so much easier to diagnose, and offer a custom CSS solution if required. Thanks!

Re: Picture frame

Posted: 10 Jul 2020, 00:41
by mjau-mjau
pede wrote:The CSS myframe style does not affect the border of the videos. How can I change the color and width of the border of videos in the gallery or at least turn it off?
Black border video.jpg
Videos work a bit different, because they are not contained within the same HTML structure as images. You can use this custom CSS for gallery videos:
Code
.x3-style-frame {
  border: 1px solid #FFFFFF;
  background: #FFFFFF;
}
You can combine the CSS with your existing custom frame style for gallery images:
Code
.myframe figure, .x3-style-frame {
  border: 1px solid #FFFFFF;
  background: #FFFFFF;
}

Re: Picture frame

Posted: 13 Jul 2020, 02:16
by pede
Thanks a lot!
I guess I'll have to take a closer look at CSS sometime. It seems to me to be very interesting with its possibilities.

Re: Picture frame

Posted: 13 Jul 2020, 04:41
by mjau-mjau
pede wrote:I guess I'll have to take a closer look at CSS sometime. It seems to me to be very interesting with its possibilities.
Indeed. Although it's not always easy to style X3 because the CSS is complex.

In a future version of X3, we will start using CSS Variables, which will make it much easier for users to customize core X3 styles.
https://developer.mozilla.org/en-US/doc ... properties