tokenshift / obsidian-page-gallery

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

Text format and text wrapping for image titles #69

Open groepl opened 5 months ago

groepl commented 5 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 5 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.