Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kiwix-serve should not be affected by ZIM's CSS #412

Closed
Popolechien opened this issue Oct 20, 2020 · 4 comments · Fixed by kiwix/libkiwix#440
Closed

Kiwix-serve should not be affected by ZIM's CSS #412

Popolechien opened this issue Oct 20, 2020 · 4 comments · Fixed by kiwix/libkiwix#440

Comments

@Popolechien
Copy link
Member

Popolechien commented Oct 20, 2020

In OpenedX ZIM file, the ZIM's CSS rules overwrites those of the kiwix-serve searchbar breaking its UI completely.

Capture d’écran 2020-10-19 à 17 23 55

Given the dynamic nature of OpenedX, it's not possible to predict nor to fix CSS there. CSS are fetched from instances and added to the ZIM.

kiwix-serve injecting this searchbar in the document, it should harden itself to prevent document style to break its UI.

@mgautierfr
Copy link
Member

This is a known problem.
As we integrate the searchbar inside the content page, the css of the content page may impact the searchbar (and the opposite).

We have carefully make the searchbar css to not impact the content but it is impossible (with the current solution) to be fully sure the content css will not impact the searchbar.

There are two solutions here :

  • Check what is the searchbar attribute changed by openEDX css and force this attribute to be what we want (for the searchbar only) in the searchbar css. It is faster, but it is a case by case workaround, we will have to fix equivalent bugs later.
  • Avoid content CSS to impact the kiwix-serve UI. This can be done with Use iframe instead of introduce taskbar. libkiwix#394

@rgaudin
Copy link
Member

rgaudin commented Oct 20, 2020

👍

@kelson42
Copy link
Contributor

kelson42 commented Jan 9, 2021

Here is the online link http://library.kiwix.org/phzh_core-greek-one_el/A/index.html If our Taskbar CSS rules are the latest ans with !important, then they should not be overriden. We need to understand exactly what is going wrong here.

@rgaudin
Copy link
Member

rgaudin commented Jan 11, 2021

kiwix-lib is looking for <head> to inject the head part of the taskbar but it's not present as the head is declared with <head dir="ltr">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants