Bjoern Hoehrmann | 2 Jan 03:47 2007
Picon
Picon

[css3-values] implied attr() types


Hi,

  http://www.w3.org/TR/2006/WD-css3-values-20060919 section 3.7.1 notes:

  Ideally, it shouldn't be necessary to specify the type if it is
  obvious. For example, this should be valid: "background-image:
  attr(href);". This could be described as: If the property only accepts
  one type of value (aside from 'inherit' and 'initial'), that type is
  implied. 

There is no obvious result for the following and the proposed definition
would not actually have the desired effect either:

  <foo href='none' style='background-image:attr(href)'>

Such a definition would also imply that we would be unable to extend the
definition of a property to accept new types of values as that would po-
tentially break existing style sheets. If we define such auto typing, we
should define for each property which type attr defaults to. I do not
think this feature is necessary at all though.

regards,
--

-- 
Björn Höhrmann · mailto:bjoern <at> hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Martijn | 3 Jan 13:24 2007
Picon

Definition of a replaced element


I was reading this mail thread:
http://lists.w3.org/Archives/Public/www-svg/2007Jan/0001.html

And it was mentioned that <svg> was a replaced element.

When I look at the definition of a replaced element:
http://www.w3.org/TR/CSS21/conform.html#replaced-element
Apparently this applies to the <svg> element, right?
"An element that is outside the scope of the CSS formatter"
So the content of an <svg> element is outside the scope of the CSS formatter?
Wat is exactly is the CSS formatter?

Definition of Rendered content:
http://www.w3.org/TR/CSS21/conform.html#rendered-content
"The rendered content of a replaced element comes from outside the
source document"
That seems to be not the case for the <svg> element, or am I
misreading this in some way?

Regards,
Martijn

--

-- 
Martijn Wargers
Help Mozilla!
http://weblogs.mozillazine.org/qa/
http://www.mozilla.org/contribute/

(Continue reading)

Christopher Tom | 3 Jan 05:00 2007
Picon

[CSS3 Text Layout] working draft


I am not sure what the status of the Text Layout module is so I decided 
to post this here.  This is my suggestion for the basis of a working 
draft of CSS Text Layout Level 3.  It is derived from Elika Eternad's 
Robust Vertical Text Layout paper for Unicode[1].

CSS Text Layout Level 3

Three properties and two classes of scripts describe the layout of text 
by this model.  The natural layout for each script determines its 
default property values and classes.

Properties:
Block progression direction specifies the direction in which successive 
lines of text are stacked.
Examples:
Latin, Arabic - down
Mongolian - right
Chinese, Japanese, Korean - left

Inline progression direction specifies the direction in which successive 
glyphs are placed within a line of text.
Examples:
Latin - right
Arabic - left
Mongolian, Chinese, Japanese, Korean - down

Text orientation specifies the direction which the glyphs' "up" points 
towards.
Examples:
(Continue reading)

Mike Bremford | 3 Jan 14:03 2007
Picon

Re: Definition of a replaced element


A replaced element is just a "black box" to CSS - the internal  
content of that box is defined by something outside CSS. Examples are  
SVG graphics as you've pointed out, but also bitmap images, java  
applets, flash, and even Text nodes (not immediately obvious, but  
makes sense if you imagine each Text node in the DOM as a box, with  
an inherent width/height based on the font, the letters and so on).

For example, consider a bitmap image. Although you can specify a  
width, height etc. which controls how that box is positioned, there's  
nothing you can do in CSS to control the contents of that box. That's  
all "replaced element" means.

Cheers... Mike

On 3 Jan 2007, at 12:24, Martijn wrote:

>
> I was reading this mail thread:
> http://lists.w3.org/Archives/Public/www-svg/2007Jan/0001.html
>
> And it was mentioned that <svg> was a replaced element.
>
> When I look at the definition of a replaced element:
> http://www.w3.org/TR/CSS21/conform.html#replaced-element
> Apparently this applies to the <svg> element, right?
> "An element that is outside the scope of the CSS formatter"
> So the content of an <svg> element is outside the scope of the CSS  
> formatter?
> Wat is exactly is the CSS formatter?
(Continue reading)

Anne van Kesteren | 3 Jan 14:07 2007
Picon

Re: Definition of a replaced element


On Wed, 03 Jan 2007 14:03:20 +0100, Mike Bremford <mike-css <at> bfo.co.uk>  
wrote:
> A replaced element is just a "black box" to CSS - the internal content  
> of that box is defined by something outside CSS. Examples are SVG  
> graphics as you've pointed out, but also bitmap images, java applets,  
> flash, and even Text nodes (not immediately obvious, but makes sense if  
> you imagine each Text node in the DOM as a box, with an inherent  
> width/height based on the font, the letters and so on).
>
> For example, consider a bitmap image. Although you can specify a width,  
> height etc. which controls how that box is positioned, there's nothing  
> you can do in CSS to control the contents of that box. That's all  
> "replaced element" means.

I'm not sure how this answers any of the specific questions raised by  
Martijn.

> On 3 Jan 2007, at 12:24, Martijn wrote:
>
>> I was reading this mail thread:
>> http://lists.w3.org/Archives/Public/www-svg/2007Jan/0001.html
>>
>> And it was mentioned that <svg> was a replaced element.
>>
>> When I look at the definition of a replaced element:
>> http://www.w3.org/TR/CSS21/conform.html#replaced-element
>> Apparently this applies to the <svg> element, right?
>> "An element that is outside the scope of the CSS formatter"
>> So the content of an <svg> element is outside the scope of the CSS  
(Continue reading)

Martijn | 3 Jan 14:24 2007
Picon

Re: Definition of a replaced element


On 1/3/07, Mike Bremford <mike-css <at> bfo.co.uk> wrote:
>
> A replaced element is just a "black box" to CSS - the internal
> content of that box is defined by something outside CSS. Examples are
> SVG graphics as you've pointed out, but also bitmap images, java

Well, svg can be styled with css, like for instance, 'fill', 'stroke',
but apparantly svg elements also use css properties like 'font' (and
derivative), 'direction', 'cursor', etc.
So the <svg> element doesn't seem to me like a "black box" to css.

Regards,
Martijn

> applets, flash, and even Text nodes (not immediately obvious, but
> makes sense if you imagine each Text node in the DOM as a box, with
> an inherent width/height based on the font, the letters and so on).
>
> For example, consider a bitmap image. Although you can specify a
> width, height etc. which controls how that box is positioned, there's
> nothing you can do in CSS to control the contents of that box. That's
> all "replaced element" means.
>
> Cheers... Mike
>
>
> On 3 Jan 2007, at 12:24, Martijn wrote:
>
> >
(Continue reading)

Mike Bremford | 3 Jan 14:57 2007
Picon

Re: Definition of a replaced element


OK, but if I do this:

<?xml version="1.0" standalone="yes"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http:// 
www.w3.org/2000/svg">
   <body style="fill:red">
     <svg:svg width="4cm" height="8cm" version="1.1">
       <svg:ellipse cx="2cm" cy="4cm" rx="2cm" ry="4cm" />
     </svg:svg>
   </body>
</html>

the SVG tag is not going to inherit the fill from the body tag. Yes,  
SVG uses CSS internally, but it's still considered a separate  
document. Try this in Amaya, which supports foreign namespaces like  
this, and you'll see what I mean.

To satisfy Anne and answer your specific question, the CSS Formatter  
is what's being used to lay out the HTML document - there's a box  
model and so on. Yes, SVG uses CSS attributes and CSS constructs, but:

* it doesn't use the CSS formatting rules to lay out the contents of  
the SVG
* it doesn't inherit attributes from outside the <svg>...</svg> tags.

It is an entirely seperate document, and the fact that it uses CSS  
attributes internally is coincidental and makes no difference to how  
it's positioned by the CSS formatter that is your browser.

(Continue reading)

Martijn | 3 Jan 15:15 2007
Picon

Re: Definition of a replaced element


On 1/3/07, Mike Bremford <mike-css <at> bfo.co.uk> wrote:
> To satisfy Anne and answer your specific question, the CSS Formatter
> is what's being used to lay out the HTML document - there's a box
> model and so on. Yes, SVG uses CSS attributes and CSS constructs, but:

So the properties mentioned at http://www.w3.org/TR/REC-CSS2/visuren.html
defines the CSS Formatte?
So if the content of the <svg> element would support one of those
properties (partially), then it would not be a replaced element
anymore?

> * it doesn't use the CSS formatting rules to lay out the contents of
> the SVG

Ok, the CSS formatting rules at
http://www.w3.org/TR/REC-CSS2/visuren.html , right?
Or are there more CSS formatting rules?

> * it doesn't inherit attributes from outside the <svg>...</svg> tags.

That seems to me more the result of being a replaced element, than
being the cause of being a replaced element, not?

Regards,
Martijn

> It is an entirely seperate document, and the fact that it uses CSS
> attributes internally is coincidental and makes no difference to how
> it's positioned by the CSS formatter that is your browser.
(Continue reading)

L. David Baron | 3 Jan 15:23 2007

Re: Definition of a replaced element

On Wednesday 2007-01-03 13:57 +0000, Mike Bremford wrote:
> the SVG tag is not going to inherit the fill from the body tag. Yes,  
> SVG uses CSS internally, but it's still considered a separate  
> document. Try this in Amaya, which supports foreign namespaces like  
> this, and you'll see what I mean.

That sounds like a bug in Amaya.

Interpreting the tiny bits of specs that imply something about how
SVG within HTML should work, but weren't intended to do that, might
lead to some conclusions.  But these aren't necessarily the right
ones.  (I'd hoped one of the things the CDF working group would be
doing is clarifying that, but that hasn't been the case so far, and
I've left the group.)

That said, the CSS WG has made a number of additions to CSS2.1
defining behavior for replaced elements that have an intrinsic ratio
but not an intrinsic width/height.  These are intended for such
cases [1], although the definitions of the default values of the
height and width attributes on the svg:svg element make them pretty
much useless for SVG as specified.

-David

[1] I'm not sure whether there was explicit discussion about whether
they were for external SVG or internal SVG, but I think they ought
to apply to both.

--

-- 
L. David Baron                                <URL: http://dbaron.org/ >
(Continue reading)

Mike Bremford | 3 Jan 16:01 2007
Picon

Re: Definition of a replaced element


What makes an element replaced? To the best of my knowledge this  
isn't defined in CSS, it's defined by the XML you're formatting -  
XHTML or whatever. But that's where I run out of steam.

> That sounds like a bug in Amaya.

Fair enough - me being lazy and trying to do everything in one file.  
The example I should have given is this:

test.html
---------
<html xmlns="http://www.w3.org/1999/xhtml">
   <body style="fill:red">
     <object data="test.svg" type="image/svg+xml"></object>
   </body>
</html>

test.svg
--------
<svg width="4cm" height="8cm" version="1.1" xmlns="http://www.w3.org/ 
2000/svg">
   <ellipse cx="2cm" cy="4cm" rx="2cm" ry="4cm" />
</svg>

Result: a black ellipse. I'm pretty sure this is the correct behaviour.

Cheers... Mike

On 3 Jan 2007, at 14:15, Martijn wrote:
(Continue reading)


Gmane