Archive for the ‘vb.net’ Category

[css3-fonts] font-face matching and font-style descriptor

Wednesday, September 22nd, 2010
Following feedback on one of our public testcases [1], I contacted John
to clarify some of his comments. While we have resolved the issue with #test3
in the testcase [2] and John will soon edit the spec to clarify it, I
am still unclear about the disagreement over #test1 and #test2 which I reduced
to the attached testcase.

Given the following CSS:

            < at >font-face
            {
                font-family: MyTestFont;
                src: local(Arial);
                font-style: italic;
            }
            #test {
                font-family: MyTestFont;
                font-style: italic;
            }     

...does #test render as italic or not ?

Firefox and Opera say no. WebKit and IE9 say yes.
So Firefox/Opera only use the font-style descriptor for font matching.
IE9 and WebKit use it for both matching and styling.

The first question is: what does the spec say ? Is there prose that unambiguously
states who is right ?

spec's intent.

If that is the case my next question is: is this rea

[css3-backgrounds] Example XV inconsistent with prose of section 3.6

Wednesday, September 22nd, 2010
      http://dev.w3.org/csswg/css3-background/
      3.6  The 'background-position' property
      If only one value is specified, the second value is assumed to be 'center'.

      3.10  The 'background' shorthand property
          p { background: 40% url("chess.png") / 10em gray

                 round fixed border-box; }

      is equivalent to:
      ...

          background-position: 40% 50%;
      ...

I believe this is incorrect.

The equivalent is
        background-position: 40% center;
or
        background-position: 40%;

Am I misunderstanding?

[cssom] Directions for better OM expansions

Wednesday, September 22nd, 2010
We've been discussing CSSOM stuff recently in Chrome team, and I
wanted to push back some of the discussion to the CSSWG list.  This
email *does not* represent Chrome's position, just my own, though
various team members' contributions have played a part in forming
these opinions.

We've been mostly discussing Anne's proposed Values API.  I think it's
a great start, but doesn't address the larger problem that the shape
of the APIs surrounding CSS is somewhat crazy.  They don't work
together - you've got el.style pointing to the < at >style attribute on an
element, el.ownerDocument.defaultView.getComputedStyle('someproperty')
to get a resolved value (sometimes a 'computed', sometimes a 'used'
value), and the stylesheet-based API.  These all work *completely*
differently, with vastly different access patterns, some being
writable while other are readonly, etc.  It's just a bad situation
overall.

So, I've boiled down the use-cases I think are useful to address (not
included in this email for brevity, but can be prov

[css3-transitions] The cubic bezier coordinates shouldn’t be clamped to [0, 1]

Wednesday, September 22nd, 2010
Following the current Editor's Draft of the CSS3 Transitions Module,
the valid Point coordinates of a cubic-bezier timing-function must be
between zero and one[1]. I'd like to propose lifting this limitation.

The primary use-case for this would be transitions which slightly, in
case of lengths, overrun the final value. This creates "elastic"
effects, some of which are visible on this page:

http://jqueryui.com/demos/effect/easing.html

One problem I can see are values which have fixed bounds, such as
colors. Darker than #000 can't be displayed, neither can lighter than
#FFF. In these cases it seems best to clamp the value to the
value-type's upper or lower bound internally.

Kind regards,
Peter Beverloo

http://peter.sh/

[1] http://dev.w3.org/csswg/css3-transitions/#transition-timing-function_tag

[css3-fonts] font-face and !important

Wednesday, September 22nd, 2010
Hi,

I was trying to figure out what to do about !important and properties of
the < at >viewport rule. I checked how it's handled for < at >font-face descriptors.

The grammar of the CSS2 spec says the descriptors are parsed as
declarations, and hence allow !important. The prose says "If a font
descriptor is duplicated, the last occurring descriptor wins and the rest
must be ignored.", but nothing about !important.

 From the latest editors draft of the CSS3 Fonts Module:

   "When a given descriptor occurs multiple times in a given < at >font-face
rule, only the last specified value is used, all prior values for that
descriptor are ignored."

I can't find anything about !important there.

I tried to search the www-style archive for "font-face !important", but
didn't find any conclusions on the subject.

Tried this in Chrome, Firefox and Opera:

<style>
< at >font-face {
   font-family: "a" !important;
   src:
url('http://themes.googleusercontent.com/font?kit=IiexqYAeh8uII223thYx3w')
format('truetype') !impo

[cssom-view] MouveEvent x and y

Wednesday, September 22nd, 2010
The current draft defines these attributes [1] as:

# The x attribute must return the value of clientX.
# The y attribute must return the value of clientY.

IE returns the distance from the border edge of the closest position:relative element or the viewport.
Opera sometimes returns the distance from the border edge of the element if it's position:absolute.
WebKit matches the current definition.

I was wondering why these attributes were specified to be synonyms for two other attributes ?

[1] http://dev.w3.org/csswg/cssom-view/#extensions-to-the-mouseevent-interface

[CSS21] [css3-text] [css3-tables] text-indent percentages

Wednesday, September 22nd, 2010
The CSS2.1 spec says that text-indent percentages are relative to the containing
block width, not the block element's width. I guess the goal was to allow use of
margins + negative text indent for hanging indents, but this has some rather...
odd implications for inline blocks and table cells.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Blank page</title>
<style>
   body {
     border: dotted thin silver;
   }
   table {
     border-spacing: 0;
   }
   .test {  width: 100px; text-indent: 50%; border: solid thin gray}
</style>
<table>
   <tr> <td class="test">T
</table>
<p><span class="test" style="display: inline-block">T</span>

Given that padding behaves the same way, though, perhaps it's best to define
the containing block of a table cell by splitting the table cell into two
boxes at the padding edge and having the outer one be the containing block
for the inner one.

And I'm wondering whether CSS3, which has explicit support for hanging indents,
should allow for using percentages of the ele

[css3-background] border-image-slice %age values

Wednesday, September 22nd, 2010
Currently implementing border-image in BlueGriffon, I have a question
relative to border-image-slice. I don't understand the use case for
percentages inside border-image-slice values. They also drastically
complexify the implementation of a wysiwyg UI for this property.

It seems to me that pixels (as <number> in the spec) are enough
since this property is likely to be always applied to bitmap images
easily controllable at pixel-level by the web author, or vectorial
images with a default viewport setting giving it again a bitmap
representation.

I understand %ages could be useful to use SVG images entirely drawn
using #ages as border images but the resulting complexity in wysiwyg
editors seems to me overkill.

</Daniel>

[css4-background][css3-box] -vertical/-horizontal Shorthands <= -top/-right/-bottom/-left + -start/-end

Wednesday, September 22nd, 2010
Lately there has been discussion whether to amend many properties that come in directional flavor with ??-start? and ??-end? variants which would take the context (block, word or character) progression into account. I believe the solution agreed upon was to do so.

Assuming those were cheap to support (in terms of memory), authors would also sometimes like to be able to specify the vertical (??-top?, ??-bottom?) or the horizontal (??-right?, ??-left?) aspects of a property at once without affecting the other dimension. Currently every shorthand property requires at least the ?top? value to be set.

Any CSS preprocessor should support such shorthand properties and expand them accordingly ? since I don?t use one I haven?t checked any. If those shorthands should also cover ??-start? and ??-end? this can only be done at run-time.

So for some future level of all affected modules I propose to add ??-vertical? and ??-horizontal? shorthands to al

[css4-color] color Custom Color Keywords

Wednesday, September 22nd, 2010
Variables or constants in CSS are very often requested. Authors want them most often for colors or for lengths (or both and more of course).

We now basically have this for typefaces with ?< at >font-face? wherein you can define your own keyword for ?font-family?. Although colors work a little different we should be able to apply the same concept.

Style more like ?< at >page?:

  < at >color MyRed {
    source: gradient("define me"), url(pattern.svg), url(pattern.png), red;
  }
  < at >color MyRed:text {
    source: red;
  }
  < at >color MyRed:border(left), MyRed:border(right) {
    source: hsla(0deg, 100%, 90%, 80%), rgba(90%, 5%, 5%, 80%), red;
  }

Style more like ?< at >font-face?:

  < at >color {
    color: MyRed;
    src: gradient("define me"), url(pattern.svg), url(pattern.png), red;
  }
  < at >color {
    color: MyRed;
    src: red;
    color-application: text;
  }
  < at >color {
    color: MyRed;
    src: hsla(0deg, 100%, 90%, 80%), rgba(90%, 5%, 5%, 80%), red;
    color-application: border-left, border-right;
  }

or