[1/2] docs: static: theme_overrides.css: fix responsive design on <640px screens

Submitted by Quentin Schulz on Sept. 17, 2020, 9:09 p.m. | Patch ID: 176613

Details

Message ID 20200917210947.51974-1-foss@0leil.net
State New
Headers show

Commit Message

Quentin Schulz Sept. 17, 2020, 9:09 p.m.
From experience the body takes the whole space anyway and the text stays
within the screen boundaries by default, no need to make the min-width
640px then.

Signed-off-by: Quentin Schulz <foss@0leil.net>
---
 documentation/sphinx-static/theme_overrides.css | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css
index c18053398..55da38a2b 100644
--- a/documentation/sphinx-static/theme_overrides.css
+++ b/documentation/sphinx-static/theme_overrides.css
@@ -4,8 +4,6 @@ 
 
 body {
   font-family: Verdana, Sans, sans-serif;
-
-  min-width: 640px;
   margin:  0em auto;
   color: #333;
 }

Comments

Nicolas Dechesne Sept. 17, 2020, 9:47 p.m.
On Thu, Sep 17, 2020 at 11:10 PM Quentin Schulz <foss@0leil.net> wrote:
>
> From experience the body takes the whole space anyway and the text stays
> within the screen boundaries by default, no need to make the min-width
> 640px then.
>
> Signed-off-by: Quentin Schulz <foss@0leil.net>
> ---
>  documentation/sphinx-static/theme_overrides.css | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css
> index c18053398..55da38a2b 100644
> --- a/documentation/sphinx-static/theme_overrides.css
> +++ b/documentation/sphinx-static/theme_overrides.css
> @@ -4,8 +4,6 @@
>
>  body {
>    font-family: Verdana, Sans, sans-serif;
> -
> -  min-width: 640px;

hmm. interesting. I made this change very early when I was still using
the default theme, not the one we use currently. I just made a few
tests, and it looks it might not be useful at all with the rtd theme..
i will test it more. Is that fixing the rendering issues you noticed
on 'mobile'?

>    margin:  0em auto;
>    color: #333;
>  }
> --
> 2.26.2
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#390): https://lists.yoctoproject.org/g/docs/message/390
Mute This Topic: https://lists.yoctoproject.org/mt/76918953/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Quentin Schulz Sept. 18, 2020, 8:14 a.m.
Hi Nicolas,

On Thu, Sep 17, 2020 at 11:47:34PM +0200, Nicolas Dechesne wrote:
> On Thu, Sep 17, 2020 at 11:10 PM Quentin Schulz <foss@0leil.net> wrote:
> >
> > From experience the body takes the whole space anyway and the text stays
> > within the screen boundaries by default, no need to make the min-width
> > 640px then.
> >
> > Signed-off-by: Quentin Schulz <foss@0leil.net>
> > ---
> >  documentation/sphinx-static/theme_overrides.css | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css
> > index c18053398..55da38a2b 100644
> > --- a/documentation/sphinx-static/theme_overrides.css
> > +++ b/documentation/sphinx-static/theme_overrides.css
> > @@ -4,8 +4,6 @@
> >
> >  body {
> >    font-family: Verdana, Sans, sans-serif;
> > -
> > -  min-width: 640px;
> 
> hmm. interesting. I made this change very early when I was still using
> the default theme, not the one we use currently. I just made a few
> tests, and it looks it might not be useful at all with the rtd theme..
> i will test it more. Is that fixing the rendering issues you noticed
> on 'mobile'?
> 

I didn't test on "real" mobile but I could emulate a screen from within
Firefox with the Developer console with Ctrl+Shift+M. You can select
Galaxy S9 for example and you'll have what I had on my mobile phone.
With my patch, using my desktop resolution, iPad's and S9's, it seems
removing it has a good impact on low resolution and none on bigger
resolution from the few tests I did.

Use Shift+Mouse wheel to navigate horizontally (at least on my distro
and in FF).
It is obvious without the horizontal scrolling when displaying the navbar
(click on the hamburger top left).

Also, I've spent an hour or sotrying to find a solution to make sphinx detect
static files changes but couldn't figure anything out.
Beware, removing the _build/html directory isn't even enough to copy
newly changed static files. I had to remove the whole _build directory
to make it rebuild. There's probably a smarter way to do it but for
automation you might to know what does not work well for now.

c.f.: https://github.com/sphinx-doc/sphinx/issues/2090

I didn't want to go the route of the last comment which is ALWAYS
rebuilding index.rst and didn't want to hack to much.

So, static_css_files and static_js_files are copied only on the first
build but not later on.

Quentin

> >    margin:  0em auto;
> >    color: #333;
> >  }
> > --
> > 2.26.2
> >
> >
> > 
> >

> 
> 
>