my17560 / dokuwiki-template-readthedokus

"Read the Docs" flavored DokuWiki template
MIT License
14 stars 11 forks source link

"Side bar width": Percentage breaks Sidebar style #59

Closed eduardomozart closed 1 year ago

eduardomozart commented 1 year ago

When using a percentage (e.g. 30%) instead of a fixed value (default: 300px) for the sidebar, the following happens:

image

But when setting it to the default value (300px), it seems to be working as expected:

image

Not sure if it's a bug or addressable, but when not specifying a unit (e.g. 300), the following happens:

image

my17560 commented 1 year ago

Thank you for your report! I've fixed it.

Please be noted, the width value needs to be a valid CSS value since it is directly placed in CSS. So you need a unit.

eduardomozart commented 1 year ago

Hello, After applying your style, even when applying a fixed width, the search bar doesn't seem aligned to center.

Here's our main Wiki that I did have applied your changes from your last commit:

image

Here I have a Wiki I didn't have applied those changes from your last commit:

image

eduardomozart commented 1 year ago

I'd also noticed that the sidebar text still doesn't seem to be resized when a percentage is used for sidebar width:

image

my17560 commented 1 year ago

On my site, the search bar appears correctly. Have you applied your own custom styles to sidebar header?

As for the sidebar not resized issue, which index plugin are you using?

And please make sure the cache is cleared for both issues.

my17560 commented 1 year ago

I've fixed the styles. Could you try the latest?

eduardomozart commented 1 year ago

Hello, I can confirm with your last commit that the search bar is center aligned as expected. But the sidebar content doesn't seem to use all space available when a percentage value is used for sidebar width. I do not believe it's related to the indexmenu plugin I'm using to the sidebar, as the "Página Inicial" (:start page title) doesn't seem to use all available sidebar space. There's no custom userstyles CSS customization in place that could affect the sidebar behavior.

For me, it seems to be related to the #dokuwiki__aside #sidebar CSS selector limiting the width of the sidebar content to 30% of it's total width (100%), as can be seen below:

image

When I disable this selector, the sidebar content seems to use all sidebar available width, as can be seen below:

image

When I use a fixed value for sidebar width (e.g. 300px), this issue doesn't happen, as I believe it behavior as "100%" because the sidebar content would be the same width as the sidebar.

Here's my :sidebar page contents:

** Ferramentas do Wiki **

  * [[:start]]
  * [[:wiki:plugin:addnewpage:newpage]]

** Barra de Navegação **

{{indexmenu>..:#1|js#doku3 navbar nsort nocookie}}
my17560 commented 1 year ago

That's weird. I've already fixed it to "100%".

line 61 of the below file: https://github.com/my17560/dokuwiki-template-readthedokus/blob/main/css/sidebar.css

Update failure?

eduardomozart commented 1 year ago

Hello, I couldn't update it through Extension Manager because the last update was 5 days ago (I already had updated) but the release wasn't updated, so I had to apply the patch manually. That was my fault, that line wasn't updated. I updated it and it worked as expected. Thank you!