Re: The 3.9 Release / documentation for Media Queries etc
In message <20190722111950.z5ycvzowlxxma...@kyllikki.org> Vincent Sanders wrote: > On Mon, Jul 22, 2019 at 11:00:25AM +0100, Jim Nagel wrote: > > Vincent Sanders wrote on 21 Jul: > > > NetSurf 3.9 features support for CSS Media Queries (level 4) and > > > improvements to JavaScript handling. Also included are many bug fixes > > > and improvements. > > > > > > Good work: thanks to the whole Netsurf team. > > > > I'd like to know more about Media Queries vis-a-vis Netsurf. Will the > > documentation (link from Netsurf welcome page) be updated soon? > > Michael already answered but i thought i would add that the mozilla > developer network is always a good reference to learn about generic web > features. Specificaly > https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries > might be helpful to you. Thanks for the pointers and the working example. It's a pity that there still appears to be no way to discover the screen or window's physical dimensions, so I don't know whether the user is looking at a 5" phone or a 25" monitor - which can make a big difference to how I'd like to render the text. All we can find is the number of pixels. Not NetSurf's fault in any way, of course. David
Re: The 3.9 Release / documentation for Media Queries etc
On Mon, Jul 22, 2019 at 11:00:25AM +0100, Jim Nagel wrote: > Vincent Sanders wrote on 21 Jul: > > NetSurf 3.9 features support for CSS Media Queries (level 4) and > > improvements to JavaScript handling. > > Also included are many bug fixes and improvements. > > > Good work: thanks to the whole Netsurf team. > > I'd like to know more about Media Queries vis-a-vis Netsurf. Will the > documentation (link from Netsurf welcome page) be updated soon? Michael already answered but i thought i would add that the mozilla developer network is always a good reference to learn about generic web features. Specificaly https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries might be helpful to you. > > As I understand it from the bottom of my learning curve, Media Queries has > to do with designing a website so that it automatically adapts according > to whether the user is viewing it on a large or small screen. > > In the site I have been working on, I have treated Netsurf as the default. > Realizing that Windows users habitually view a page the full size of their > wide monitor, and thus get unreadably wide lines of text, I inserted a > workaround to constrain page to 800px (about A5 width). This works fine > on A5 Android tablet too. > > The problem of sensibly adapting the layout for a small screen on a > smartphone has so far eluded me, hence my interest in Media Queries. > > > -- > Jim Nagelwww.archivemag.co.uk > > > > -- Regards Vincent http://www.kyllikki.org/
Re: The 3.9 Release / documentation for Media Queries etc
On 22/07/2019 11:00, Jim Nagel wrote: > As I understand it from the bottom of my learning curve, Media Queries has > to do with designing a website so that it automatically adapts according > to whether the user is viewing it on a large or small screen. Yes, exactly. It's a way to make conditionalise the application of groups of CSS rules. So you can give elements different CSS properties depending on, for example, the width of the window. Here's a trivial example. It will show "large", "medium", or "small" depending on the width of the page. http://test.netsurf-browser.org/html/mq.test.html Note, in NetSurf we don't support dynamic changes to the computed style yet, so as you change the width of the window, you'll need to click reload to see the effect. Cheers, -- Michael Drake https://www.codethink.co.uk/
Re: The 3.9 Release / documentation for Media Queries etc
Vincent Sanders wrote on 21 Jul: > NetSurf 3.9 features support for CSS Media Queries (level 4) and > improvements to JavaScript handling. > Also included are many bug fixes and improvements. Good work: thanks to the whole Netsurf team. I'd like to know more about Media Queries vis-a-vis Netsurf. Will the documentation (link from Netsurf welcome page) be updated soon? As I understand it from the bottom of my learning curve, Media Queries has to do with designing a website so that it automatically adapts according to whether the user is viewing it on a large or small screen. In the site I have been working on, I have treated Netsurf as the default. Realizing that Windows users habitually view a page the full size of their wide monitor, and thus get unreadably wide lines of text, I inserted a workaround to constrain page to 800px (about A5 width). This works fine on A5 Android tablet too. The problem of sensibly adapting the layout for a small screen on a smartphone has so far eluded me, hence my interest in Media Queries. -- Jim Nagelwww.archivemag.co.uk