LNReader / lnreader

Light novel reader for Android.
https://lnreader.github.io
MIT License
1.74k stars 187 forks source link

Bring back the CSS default settings of 1.1.18 #922

Closed Palloxin closed 8 months ago

Palloxin commented 8 months ago

Describe your suggested feature

As the title says. Or fix it a bit. Body has no padding. nyagami, so.

  1. Default padding can'be changed with CSS addressing "body" or "chapter" (One has to address p to do so)
    body,chapter {
    padding: 0px !important;
    }

    while before 1.1.19 one could change it using body. Raw chapter text mode↓ Screenshot_20240117-161812 Text not inside a tag IMG_20240117_155046 I set the padding on body.

  2. The default CSS of preview in Reader section of settings is different from the one applied to chapters (i can change padding using body on the preview but not on chapters)
  3. Text that is not contained in a tag will have 0px padding. The same applies to the text of a chapter when one uses the "raw chapter text" script.

https://github.com/LNReader/lnreader/assets/75091899/b4cc27be-d13c-42ff-858c-6e7875242d73

Preview allows to scroll sideways? pls no. Idk if it happens on chapters too.

Is possible to revert some of the CSS parameters back to the 1.1.18? I know the change comes from the horizontal paging feature but i am sure there can be a balance between this request and the current feature.

Other details

No response

Acknowledgements

rajarsheechatterjee commented 8 months ago

Default padding can'be changed with CSS addressing "body" or "chapter" (One has to address p to do so)

body {
  padding: ANY_VALUE;
}

This is working as expected.

Palloxin commented 8 months ago

The first point is correctly wrong, ok. I presented 3 more points for the issue which are still true.

IMG_20240129_091659 Can you reopen it?

rajarsheechatterjee commented 8 months ago
  1. The default CSS of preview in Reader section of settings is different from the one applied to chapters (i can change padding using body on the preview but not on chapters)

Both can be changed using padding on body.

  1. Text that is not contained in a tag will have 0px padding. The same applies to the text of a chapter when one uses the "raw chapter text" script.

Everything is contained under body and all the chapter text is under chapter tag.

  1. Preview allows to scroll sideways? pls no. Idk if it happens on chapters too.

No, it wouldn't happen in Reader as there are CSS styles to prevent that.

Palloxin commented 8 months ago

Both can be changes using padding on body. Yeah, i used this css and..

body{
padding: 0.5em
}

preview: IMG_20240129_093332 reader: IMG_20240129_093316

the padding is different, the default css applied to preview and reading is not the same.

Everything is contained under body and all the chapter text is under chapter tag.

Fine it is still into a tag, but the default padding is not applied to body. That is what I wanted to point, to bring back how it was in the 1.1.18 where the default padding was applied to body.

No, it wouldn't happen in Reader as there are CSS styles to prevent that.

Yeah but it happens in the preview, which confirms the second point (2.)

Addition: The css problem applies to the raw chapter text mode (using JS script). In the 1.1.18 the css was applied there too with no problem but now it is bizare. 1em (body) applied while on raw chapter text is less than the normal mode. Idk it is just confusing and annoying. Raw Chapter Text mode: IMG_20240129_095311

Normal mode: IMG_20240129_095438

the same CSS applied but with different result. The deafult CSS in the 1.1.19 is just confusing for no reason. The one in 1.1.18 was fine. Now it is just complicated for no reason.

rajarsheechatterjee commented 8 months ago

padding: 0.5em

em is a relative unit. It depends on the font-size. If the fontSizes are different in Preview and Reader the padding's would be different.

Fine it is still into a tag, but the default padding is not applied to body. That is what I wanted to point, to bring back how it was in the 1.1.18 where the default padding was applied to body.

Why should the app support it when it can be easily achieved by your custom CSS?

Yeah but it happens in the preview, which confirms the second point (2.)

You can just add:

html {
  word-wrap: break-word;
}

The css problem applies to the raw chapter text mode (using JS script). In the 1.1.18 the css was applied there too with no problem but now it is bizare. 1em (body) applied while on raw chapter text is less than the normal mode. Idk it is just confusing and annoying.

In the reader, now the padding is added to the elements inside the chapter tag. You can override it if you want:

chapter > * {
  padding-left: 0;
  padding-right: 0;
}

The deafult CSS in the 1.1.19 is just confusing for no reason. The one in 1.1.18 was fine. Now it is just complicated for no reason.

Not really.

Palloxin commented 8 months ago

em is a relative unit. It depends on the font-size. If the fontSizes are different in Preview and Reader the padding's would be different.

Yeah, the font in both images is the same. There was not such a problem on 1.1.18 ver.

Why should the app support it when it can be easily achieved by your custom CSS?

The app supported it in the 1.1.18. Now the default padding is applied to the tags inside body. It is like having a shop to buy everything one needs(1.1.18k but now u have to go 8 different ones to buy all u need(1.1.19) I had to just point body and that was it. Also, the point of 2. is that the reader and preview have different default CSS (preview has css A, reader has css B) in the 1.1.19. It was fine in the 1.1.18.

You can just add:

html {
  word-wrap: break-word;
}

I want it the the default CSS of the preview. This reinforces the second point. The default CSS in the preview and reader is not the same which makes the job of the preview not an exact preview.

In the reader, now the padding is added to the elements inside the chapter tag. You can override it if you want.

In the 1.1.18 is was easier to understand and manage. Better.

Not really.

Of course it isn't for a developer, especially a LNReader one... :/ I am a normal user that can CSS a tiny tiny bit. In the 1.1.18 it was more understandable. Now it is complicated (not for devs) Just the example above with the em is confusing as hell. Again. there wasn't such a thing in the 1.1.18 Is there REALLY not a solution to keep the advantages of the 1.1.18 default CSS and the 1.1.19 one (the one that came to accomodate the horizontal paging) Can there be two different default CSS for when the horizontal paging is turned on?(i am just throwing a random solution)