Changing appearance of query block in preview mode

I’m not a coder but have dabbled with CSS in the past on a very basic level. I’ve mostly forgotten anything I did know, but would like to learn some more again. It’s really bugging me that the query blocks in preview are showing unfolded:

I’d much rather a nice clean result list with the results folded by default instead, or just a simple link to the page:

I’d also like the search parameters text by the magnifying glass icon to be a smaller font size. Any tips on how I’d go about doing these things, or are they too advanced for me to have a go at? Thought I’d ask just in case though. Thanks very much

Hey if I understood correctly there’s already a solution built in for this.
Click on the collapse results icon

image

That will display results folded in a nice organized way.

Let me know if that solves it

Sorry I wasn’t very clear. It’s the results of query block within a page that I’m trying to be collapsed by default as opposed to the search pane. Thanks

1 Like

Got you, that makes sense, my bad I know what you mean

You are talking about doing this inside a note

I think you should make a feature request for this, it might already be in the devs plans, but it doesn’t hurt to show your interest, since I agree it’s a lot better to be able to have collapsed results.

I’m not saying it’s impossible to achieve it yourself with css, but it would definitely be really hard. Css is mostly for styling things. Being able to add a feature like this would do a lot better as a community plugin, but that’s of course harder to achieve.

But because this is a core functionality in Obsidian I’d advice you to write a feature request on it

Best of luck!

Thank you for taking the time to looking into it and glad I checked rather than spending ages trying to get somewhere with CSS. Like you say, it might already be in the devs plans to develop the query block results and add more functionality in general but I’ll put in a feature request anyway.

2 Likes

awesome sounds good, I’ll mark this post as resolved, but make sure to do a separate request, since I think it’s really useful to implement this

1 Like

@Cat_of_the_Hills did you manage to put the feature request in? I would really like to see this too.

Nick