- From: Brad Kemper <brkemper@comcast.net>
- Date: Fri, 27 Jun 2008 09:58:25 -0700
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- Cc: Simetrical <simetrical@gmail.com>, "Zachary Weinberg" <zweinberg@mozilla.com>, www-style@w3.org
- Message-Id: <0FC2599A-290B-4984-8249-B37D5EE4274D@comcast.net>
On Jun 27, 2008, at 8:55 AM, Tab Atkins Jr. wrote: > > > On Fri, Jun 27, 2008 at 10:44 AM, Brad Kemper <brkemper@comcast.net> > wrote: > > On Jun 27, 2008, at 6:16 AM, Simetrical wrote: > > > On Thu, Jun 26, 2008 at 9:24 PM, Brad Kemper <brkemper@comcast.net> > wrote: > You could have a property on the text box like this: > > { text-replaced-by: image; } > > or > > { text-replaced-by: svg } > > This is exactly what the content property does in CSS3. > > > Yes, well, except that if I insert an image with 'content: > url(header.png), contents;', then it would be a foreground image and > I would not be able to crop it with a height or width based on ems > or percentage, right? So a little less flexible for flexible > layouts. Or if I had other foreground elements to go inside the > element (besides the replaced content), wouldn't they be pushed > aside by the foreground image? > > Well, the clip: property allows you to set it in px or em, or you > could always use the simple expedient of setting the height/width > and using overflow:hidden. Good point. Are there any other ramifications of using a foreground image instead of a background one? > Do you often use elements other than text in your replaced > elements? The common use case seems to be replacing the content of > a link, where you're just removing some text and putting in an image > instead. > > ~TJ The truth is, I don't use FIR technics all that much myself (just a couple times), but I am familiar with them and have followed the techniques with some interest, and was trying to anticipate whether the content property would be enough. It certainly does seem a promising alternative to current techniques. I would like to know the thoughts are of people who actually do a lot of this sort of thing, or who have invented new techniques based on perceived problems with existing techniques. It seems like content property could work, but I don't know what all of the ramifications might be.
Received on Friday, 27 June 2008 16:59:09 UTC