tokenshift / obsidian-page-gallery

Generates a gallery based on selected page contents.
MIT License
65 stars 2 forks source link

Text format and text wrapping for image titles #69

Open groepl opened 4 months ago

groepl commented 4 months ago
image

It would be nice to be able to format the titles (file.name) below the images. No bold, no shadow, text normal or small, wrap text over different lines (not cut by ...).

Thank you for your amazing plugin. It's fun to use it. :-)

tokenshift commented 3 months ago

You can customize page-gallery styling by using CSS snippets. Example for removing/overriding the default style for "filename as the first/top displayed field":

.page-gallery__field[data-page-gallery-field-expression="file.name"]:first-child {
  font-weight: normal;
  text-shadow: none;
  white-space: normal;
}

I'll leave this ticket open as I think it makes sense to add an option for whether the filename field should be highlighted as is the default right now; but any more advanced or custom styling will still need CSS snippets rather than being built-in.