is this css legal ?

Discussion in 'HTML' started by NoWhereMan, Oct 6, 2006.

  1. NoWhereMan

    NoWhereMan Guest

    are these css selectors legal ?

    ..storycontent > p:first-child:first-letter{
    font-size: 6em;
    color: #bc0f09;
    font-family: Georgia, Times, 'Times New Roman', serif;
    float: left;
    padding: 0.1em;
    }

    ..storycontent > p:first-child:first-line{
    font-variant: small-caps;
    font-size: 1.3em;
    }

    looks like syntactically valid (the w3c validator says it is) but is it
    legal ?

    firefox interprets this as I suppose it should; opera does not :(


    --
    NoWhereMan
    -- NoWhereBlog: www.nowhereland.it
    -- deviantArt: http://nowhereland.deviantart.com
    -- Giochi a BiteFight? http://bitefight.nowhereland.it/
    -- Vagisil migliora la tua vita intima: www.vagisil.com/teencenter.shtml
    NoWhereMan, Oct 6, 2006
    #1
    1. Advertising

  2. NoWhereMan wrote:
    > are these css selectors legal ?
    >
    > .storycontent > p:first-child:first-letter{
    > font-size: 6em;
    > color: #bc0f09;
    > font-family: Georgia, Times, 'Times New Roman', serif;
    > float: left;
    > padding: 0.1em;
    > }
    >
    > .storycontent > p:first-child:first-line{
    > font-variant: small-caps;
    > font-size: 1.3em;
    > }
    >
    > looks like syntactically valid (the w3c validator says it is) but is it
    > legal ?


    Why do you doubt the veracity of the W3C validator?

    >
    > firefox interprets this as I suppose it should; opera does not :(


    The W3C validator is a priori more reliable (because comprehensive) than
    Opera.
    Harlan Messinger, Oct 6, 2006
    #2
    1. Advertising

  3. NoWhereMan <> writes:

    > are these css selectors legal ?
    >
    > .storycontent > p:first-child:first-letter{


    > .storycontent > p:first-child:first-line{


    > looks like syntactically valid (the w3c validator says it is) but is it
    > legal ?


    It looks suspicious but formally correct.

    > firefox interprets this as I suppose it should; opera does not :(


    The odds are that Opera does the right thing; you did not show the
    markup, and probably not the complete style sheet.

    So what's the value of P's first child's display property (hint)?


    --
    ||| hexadecimal EBB
    o-o decimal 3771
    --oOo--( )--oOo-- octal 7273
    205 goodbye binary 111010111011
    Eric B. Bednarz, Oct 6, 2006
    #3
  4. Eric B. Bednarz wrote:
    > NoWhereMan <> writes:
    >
    >> are these css selectors legal ?
    >>
    >> .storycontent > p:first-child:first-letter{

    >
    >> .storycontent > p:first-child:first-line{

    >
    >> looks like syntactically valid (the w3c validator says it is) but is it
    >> legal ?

    >
    > It looks suspicious


    Why? Because it's redundant?

    > but formally correct.
    >
    >> firefox interprets this as I suppose it should; opera does not :(

    >
    > The odds are that Opera does the right thing; you did not show the
    > markup, and probably not the complete style sheet.
    >
    > So what's the value of P's first child's display property (hint)?
    >


    As with any of the pseudo-elements, it's pseudo. There isn't an element
    there that has properties of its own, display or otherwise. Only if a
    element specifier, to which a pseudo-element specifier is attached in a
    selector, matches an element in the document does the UA act *as if*
    there were an element possessing (only) the style properties that are
    set. This is what happens in the case of

    div.story:first-letter {
    float: left;
    font-size: 3em;
    font-weight: bold;
    }

    At that point, the UA equally well act *as if* that pseudo-element has
    pseudo-elements of its own, if a reference that could be interpreted
    that way appear in a selector.
    Harlan Messinger, Oct 6, 2006
    #4
  5. NoWhereMan

    richard Guest

    "NoWhereMan" <> wrote in message
    news:1jysbvn2ek2zn.1xm11nkjtugck$...
    > are these css selectors legal ?
    >
    > .storycontent > p:first-child:first-letter{
    > font-size: 6em;
    > color: #bc0f09;
    > font-family: Georgia, Times, 'Times New Roman', serif;
    > float: left;
    > padding: 0.1em;
    > }
    >
    > .storycontent > p:first-child:first-line{
    > font-variant: small-caps;
    > font-size: 1.3em;
    > }
    >
    > looks like syntactically valid (the w3c validator says it is) but is it
    > legal ?
    >
    > firefox interprets this as I suppose it should; opera does not :(


    What's with the > before p?
    The only time > should be used is to denote a tag.
    <tag></tag>
    richard, Oct 6, 2006
    #5
  6. NoWhereMan

    NoWhereMan Guest

    on Fri, 06 Oct 2006 20:43:27 +0200, Eric B. Bednarz wrote:

    >> looks like syntactically valid (the w3c validator says it is) but is it
    >> legal ?

    >
    > It looks suspicious but formally correct.
    >
    >> firefox interprets this as I suppose it should; opera does not :(

    >
    > The odds are that Opera does the right thing; you did not show the
    > markup, and probably not the complete style sheet.
    >
    > So what's the value of P's first child's display property (hint)?


    you can see full page at the nowhereblog on my sign :)

    --
    NoWhereMan
    -- NoWhereBlog: www.nowhereland.it
    -- deviantArt: http://nowhereland.deviantart.com
    NoWhereMan, Oct 6, 2006
    #6
  7. NoWhereMan

    NoWhereMan Guest

    on Fri, 06 Oct 2006 14:02:47 -0400, Harlan Messinger wrote:

    > Why do you doubt the veracity of the W3C validator?


    well, I couldn't find anything about this in the css specs

    >>
    >> firefox interprets this as I suppose it should; opera does not :(

    >
    > The W3C validator is a priori more reliable (because comprehensive) than
    > Opera.


    yes, but it's strange for a browser passing the acid test (even thought
    that's not really a reliable test for standard-compliance) not working with
    this; no probs, though, do you think I should file a bug to opera, then?

    --
    NoWhereMan
    -- NoWhereBlog: www.nowhereland.it
    -- deviantArt: http://nowhereland.deviantart.com
    NoWhereMan, Oct 6, 2006
    #7
  8. NoWhereMan

    NoWhereMan Guest

    on Fri, 06 Oct 2006 15:05:20 -0400, Harlan Messinger wrote:

    > Eric B. Bednarz wrote:
    >> NoWhereMan <> writes:
    >>
    >>> are these css selectors legal ?
    >>>
    >>> .storycontent > p:first-child:first-letter{

    >>
    >>> .storycontent > p:first-child:first-line{

    >>
    >>> looks like syntactically valid (the w3c validator says it is) but is it
    >>> legal ?

    >>
    >> It looks suspicious

    >
    > Why? Because it's redundant?


    i used the first-child because if I used only the first-letter I would have
    the big capital with every new <p>. You can see the markup at the
    nowhereblog linked on my sign :)

    [...]
    > At that point, the UA equally well act *as if* that pseudo-element has
    > pseudo-elements of its own, if a reference that could be interpreted
    > that way appear in a selector.


    yes, that's what I thought when I used such a trick. however if you have a
    suggestion for a (maybe) better solution just let me know. Css's are not
    really my matter :)

    bye

    --
    NoWhereMan
    -- NoWhereBlog: www.nowhereland.it
    -- deviantArt: http://nowhereland.deviantart.com
    NoWhereMan, Oct 6, 2006
    #8
  9. David Dorward, Oct 6, 2006
    #9
  10. Harlan Messinger wrote:

    > As with any of the pseudo-elements, it's pseudo.


    Er--pseudo-class, and first-child really *does* refer to an element from
    which properties hang, despite what I wrote below.

    > There isn't an element
    > there that has properties of its own, display or otherwise. Only if a
    > element specifier, to which a pseudo-element specifier is attached in a
    > selector, matches an element in the document does the UA act *as if*
    > there were an element possessing (only) the style properties that are
    > set. This is what happens in the case of
    > [...]
    Harlan Messinger, Oct 6, 2006
    #10
  11. richard wrote:
    >
    > "NoWhereMan" <> wrote in message
    > news:1jysbvn2ek2zn.1xm11nkjtugck$...
    >> are these css selectors legal ?
    >>
    >> .storycontent > p:first-child:first-letter{
    >> font-size: 6em;
    >> color: #bc0f09;
    >> font-family: Georgia, Times, 'Times New Roman', serif;
    >> float: left;
    >> padding: 0.1em;
    >> }
    >>
    >> .storycontent > p:first-child:first-line{
    >> font-variant: small-caps;
    >> font-size: 1.3em;
    >> }
    >>
    >> looks like syntactically valid (the w3c validator says it is) but is it
    >> legal ?
    >>
    >> firefox interprets this as I suppose it should; opera does not :(

    >
    > What's with the > before p?
    > The only time > should be used is to denote a tag.
    > <tag></tag>
    >


    RTFM, http://www.w3.org/TR/CSS21/selector.html#child-selectors

    Disregard richard...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Oct 6, 2006
    #11
  12. NoWhereMan

    Andy Dingley Guest

    richard wrote:

    > What's with the > before p?


    Check the posting profile and the trucking groups

    Yes, it's Bullis The Stupid back again!


    If you care, the ">" is called a child selector in CSS and it's in the
    CSS spec. Not a huge amount of use as IE has issues with it, but it is
    valid.
    Andy Dingley, Oct 6, 2006
    #12
  13. NoWhereMan

    richard Guest

    hope you have a nicer day, bitch.
    richard, Oct 6, 2006
    #13
  14. NoWhereMan

    Andy Dingley Guest

    richard wrote:


    Please: don't get angry, get _smarter_.
    Andy Dingley, Oct 7, 2006
    #14
  15. NoWhereMan

    dorayme Guest

    In article <>,
    Harlan Messinger <> wrote:

    > > firefox interprets this as I suppose it should; opera does not :(

    >
    > The W3C validator is a priori more reliable (because comprehensive) than
    > Opera.


    I think you want "prima facie" rather than "a priori"...

    --
    dorayme
    dorayme, Oct 7, 2006
    #15
  16. Andy Dingley wrote:

    > Please: don't get angry, get _smarter_.


    After all these years, aren't you being overly optimistic?

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Oct 7, 2006
    #16
  17. NoWhereMan

    dorayme Guest

    In article
    <oMBVg.209990$>,
    "Beauregard T. Shagnasty" <> wrote:

    > Andy Dingley wrote:
    >
    > > Please: don't get angry, get _smarter_.

    >
    > After all these years, aren't you being overly optimistic?


    I saw AD as being evangelical... realistic optimism does not come
    into it...

    :)

    --
    dorayme
    dorayme, Oct 7, 2006
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Valentin Tihomirov

    Is this legal?

    Valentin Tihomirov, Oct 21, 2003, in forum: VHDL
    Replies:
    20
    Views:
    1,227
    Jan Decaluwe
    Oct 29, 2003
  2. Divyang M
    Replies:
    9
    Views:
    608
    Divyang M
    May 18, 2005
  3. Divyang M
    Replies:
    1
    Views:
    556
    Jerzy Gbur
    May 15, 2005
  4. Weng Tianxiang
    Replies:
    12
    Views:
    1,385
  5. =?Utf-8?B?RGF2ZQ==?=

    Legal ViewState Characters

    =?Utf-8?B?RGF2ZQ==?=, May 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    356
    Patrice
    May 24, 2004
Loading...

Share This Page