Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2012-04-11 05:11:02

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Additional wrapper around listings tables ?

philwareham wrote:

I’m not sure that would work though, as the system gives the img tag an implicit width and height attribute, breaking that responsive image technique.

max-width trumps width, always. Oh, right – the image is in a auto-width table-cell in a table with percentage width. It works fine in WebKit based browsers, but IE-Gecko-Opera(mobile) fall back on the intrinsic width of the image as they can’t seem to compute the 100% max-width (undefined loop).

Can you tell we don’t do much in images here? <:g>

This ought to work everywhere, I think:

#page-image .edit-pane { table-layout: fixed; }
/* makes the image scale correctly… in Gecko Opera IE */
.image.fullsize {
	width: auto;
	height: auto;
	max-width: 100%;
}

Offline

#12 2012-04-11 05:21:24

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Additional wrapper around listings tables ?

Bloke wrote:

Fair enough. I’m on the case.

Fwiw, for ease of tracking, I’ve filed this as issue 167.

Offline

#13 2012-04-11 06:42:42

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,209
Website

Re: Additional wrapper around listings tables ?

Regarding images – a simpler solution would be to get the width and height attributes removed from images in the system and let the browser size them. We can then use the max-width rule method.

Offline

#14 2012-04-11 06:50:34

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Additional wrapper around listings tables ?

philwareham wrote:

Regarding images – a simpler solution would be to get the width and height attributes removed from images in the system and let the browser size them. We can then use the max-width rule method.

No, that won’t help due to the image being wrapped inside a table with table-layout:auto.

2 test cases (view source…), compare WebKit vs Gecko or IE
http://dev.l-c-n.com/_temp/w_image.html
http://dev.l-c-n.com/_temp/w_image2.html

Offline

#15 2012-04-11 08:51:07

Gocom
Plugin Author
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Additional wrapper around listings tables ?

philwareham wrote:

Regarding images – a simpler solution would be to get the width and height attributes removed from images in the system and let the browser size them.

I’m throwing my big no card on this. User-experience, remember the user-experience.

The only thing removing the width and height from the images will do is jagged loading. Love me some jumping content when the browser finds out the image sizes one by one, instead of knowing them from get go. That is unless we want to make the page preloaded. Oh yeah, that’s why large, cheesy badly coded applets suck. And then there is the second option of making the sizes hard-coded and clipping/scaling the images to a grid.

Offline

#16 2012-04-11 09:51:50

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,209
Website

Re: Additional wrapper around listings tables ?

Gocom wrote:

The only thing removing the width and height from the images will do is jagged loading.

Yeah, it was a compromised solution at best.

Offline

#17 2012-04-19 08:19:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Additional wrapper around listings tables ?

phiw13 wrote:

Fwiw, for ease of tracking, I’ve filed this as issue 167.

Stef checked my patch in rev3748.

There is now a class="txp-listtables" for this specific purpose.

Offline

#18 2012-04-19 10:15:08

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,209
Website

Re: Additional wrapper around listings tables ?

Hi Stef, you seem to have missed the table on the plugins page? No div wrapper on that one at the moment.

Offline

#19 2012-04-19 12:41:11

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Additional wrapper around listings tables ?

Uh, that is weird. I edited that file, why didn’t svn diff pick it up ?

I’ll generate a patch later and attach it to issue 167.

Offline

#20 2012-04-28 02:43:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Additional wrapper around listings tables ?

phiw13 wrote:

Uh, that is weird. I edited that file, why didn’t svn diff pick it up ?

I’ll generate a patch later and attach it to issue 167.

Bloke, ping ? Can you check that additional patch in ?

Last edited by phiw13 (2012-04-28 02:43:25)

Offline

Board footer

Powered by FluxBB